home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-05-24 | 15.1 KB | [TEXT/MSET] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: Scroller
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue May 24 08:41:13 1994, modified Tue May 24 08:41:13 1994, creator 'MSET', type ASCII, 14947 bytes "Scroller" , at 0x3ae3 375 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MSET] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 53 63 72 6f 6c 6c | 65 72 00 00 00 00 00 00 |..Scroll|er......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 53 45 | 54 01 00 00 00 00 00 00 |.TEXTMSE|T.......|
|00000050| 00 00 00 00 00 3a 63 00 | 00 01 77 aa 07 a6 69 aa |.....:c.|..w...i.|
|00000060| 07 a6 69 00 00 08 00 00 | 00 00 00 00 00 00 00 00 |..i.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 79 54 00 00 |........|....yT..|
|00000080| 5c 20 53 63 72 6f 6c 6c | 65 72 20 2d 20 76 69 65 |\ Scroll|er - vie|
|00000090| 77 20 77 68 69 63 68 20 | 73 75 70 70 6f 72 74 73 |w which |supports|
|000000a0| 20 73 63 72 6f 6c 6c 20 | 62 61 72 73 2e 0d 0d 5c | scroll |bars...\|
|000000b0| 20 4d 61 79 20 39 31 09 | 6d 72 68 09 41 64 64 65 | May 91.|mrh.Adde|
|000000c0| 64 20 68 6f 72 69 7a 6f | 6e 74 61 6c 20 73 63 72 |d horizo|ntal scr|
|000000d0| 6f 6c 6c 20 62 61 72 20 | 73 75 70 70 6f 72 74 2e |oll bar |support.|
|000000e0| 0d 5c 20 4f 63 74 20 39 | 31 09 6d 72 68 09 43 68 |.\ Oct 9|1.mrh.Ch|
|000000f0| 61 6e 67 65 64 20 6f 77 | 6e 65 72 20 66 72 6f 6d |anged ow|ner from|
|00000100| 20 57 69 6e 64 6f 77 20 | 74 6f 20 56 69 65 77 2e | Window |to View.|
|00000110| 20 20 52 65 70 6c 61 63 | 65 73 20 76 73 63 72 6f | Replac|es vscro|
|00000120| 6c 6c 20 0d 5c 20 4d 61 | 79 20 39 32 09 6d 72 68 |ll .\ Ma|y 92.mrh|
|00000130| 09 43 68 61 6e 67 65 64 | 20 74 6f 20 22 6e 65 77 |.Changed| to "new|
|00000140| 2d 73 74 79 6c 65 22 20 | 63 6f 6e 74 72 6f 6c 2e |-style" |control.|
|00000150| 0d 5c 20 4a 75 6e 65 20 | 39 32 09 6d 72 68 09 46 |.\ June |92.mrh.F|
|00000160| 69 78 65 64 20 47 65 74 | 52 65 63 74 3a 20 69 6e |ixed Get|Rect: in|
|00000170| 20 53 63 72 6f 6c 6c 65 | 72 2e 0d 5c 20 46 65 62 | Scrolle|r..\ Feb|
|00000180| 20 39 33 09 6d 72 68 20 | 49 6e 74 72 6f 64 75 63 | 93.mrh |Introduc|
|00000190| 65 64 20 63 6c 61 73 73 | 20 42 69 67 52 65 63 74 |ed class| BigRect|
|000001a0| 20 66 6f 72 20 50 61 6e | 52 65 63 74 73 2c 20 74 | for Pan|Rects, t|
|000001b0| 6f 20 61 6c 6c 6f 77 20 | 68 75 6d 75 6e 67 6f 75 |o allow |humungou|
|000001c0| 73 20 72 65 63 74 73 2e | 0d 5c 20 53 65 70 74 20 |s rects.|.\ Sept |
|000001d0| 39 33 09 6d 72 68 09 52 | 65 76 69 73 65 64 20 66 |93.mrh.R|evised f|
|000001e0| 6f 72 20 6e 65 77 20 63 | 6f 6e 74 72 6f 6c 20 73 |or new c|ontrol s|
|000001f0| 63 68 65 6d 65 20 2d 20 | 63 6f 6e 74 72 6f 6c 73 |cheme - |controls|
|00000200| 20 6e 6f 77 20 61 20 76 | 69 65 77 20 73 75 62 63 | now a v|iew subc|
|00000210| 6c 61 73 73 2e 0d 0d 6e | 65 65 64 09 76 69 65 77 |lass...n|eed.view|
|00000220| 0d 6e 65 65 64 09 63 74 | 6c 0d 0d 0d 5c 20 53 43 |.need.ct|l...\ SC|
|00000230| 52 4f 4c 4c 45 52 20 69 | 73 20 61 20 76 69 65 77 |ROLLER i|s a view|
|00000240| 20 77 68 69 63 68 20 68 | 61 73 20 73 75 70 70 6f | which h|as suppo|
|00000250| 72 74 20 66 6f 72 20 61 | 20 76 65 72 74 69 63 61 |rt for a| vertica|
|00000260| 6c 20 61 6e 64 20 68 6f | 72 69 7a 6f 6e 74 61 6c |l and ho|rizontal|
|00000270| 0d 5c 20 73 63 72 6f 6c | 6c 20 62 61 72 20 61 6c |.\ scrol|l bar al|
|00000280| 6f 6e 67 20 74 68 65 20 | 72 69 67 68 74 20 68 61 |ong the |right ha|
|00000290| 6e 64 20 61 6e 64 20 62 | 6f 74 74 6f 6d 20 65 64 |nd and b|ottom ed|
|000002a0| 67 65 20 72 65 73 70 65 | 63 74 69 76 65 6c 79 2e |ge respe|ctively.|
|000002b0| 20 20 57 65 20 69 6d 70 | 6c 65 6d 65 6e 74 0d 5c | We imp|lement.\|
|000002c0| 20 69 74 20 77 69 74 68 | 20 74 68 72 65 65 20 63 | it with| three c|
|000002d0| 68 69 6c 64 20 76 69 65 | 77 73 3a 20 6d 61 69 6e |hild vie|ws: main|
|000002e0| 56 69 65 77 2c 20 77 68 | 69 63 68 20 69 73 20 74 |View, wh|ich is t|
|000002f0| 68 65 20 64 69 73 70 6c | 61 79 20 61 72 65 61 2c |he displ|ay area,|
|00000300| 20 61 6e 64 20 74 68 65 | 0d 5c 20 74 77 6f 20 73 | and the|.\ two s|
|00000310| 63 72 6f 6c 6c 20 62 61 | 72 73 20 74 68 65 6d 73 |croll ba|rs thems|
|00000320| 65 6c 76 65 73 2e 0d 0d | 5c 20 4d 61 69 6e 56 69 |elves...|\ MainVi|
|00000330| 65 77 20 69 73 20 61 6e | 20 69 6e 73 74 61 6e 63 |ew is an| instanc|
|00000340| 65 20 6f 66 20 61 20 6f | 6e 65 2d 6f 66 66 20 63 |e of a o|ne-off c|
|00000350| 6c 61 73 73 2c 20 4d 76 | 69 65 77 2e 20 20 54 68 |lass, Mv|iew. Th|
|00000360| 69 73 20 63 6c 61 73 73 | 20 68 61 73 20 61 0d 5c |is class| has a.\|
|00000370| 20 72 65 63 74 61 6e 67 | 6c 65 2c 20 50 61 6e 52 | rectang|le, PanR|
|00000380| 65 63 74 2c 20 77 68 69 | 63 68 20 6e 6f 72 6d 61 |ect, whi|ch norma|
|00000390| 6c 6c 79 20 6f 75 67 68 | 74 20 74 6f 20 65 6e 63 |lly ough|t to enc|
|000003a0| 6c 6f 73 65 20 61 6c 6c | 20 74 68 65 20 63 68 69 |lose all| the chi|
|000003b0| 6c 64 20 76 69 65 77 73 | 0d 5c 20 6f 66 20 74 68 |ld views|.\ of th|
|000003c0| 65 20 4d 76 69 65 77 2e | 20 20 54 68 65 20 75 73 |e Mview.| The us|
|000003d0| 75 61 6c 20 73 63 65 6e | 61 72 69 6f 20 69 73 20 |ual scen|ario is |
|000003e0| 74 68 61 74 20 50 61 6e | 52 65 63 74 20 69 73 20 |that Pan|Rect is |
|000003f0| 6c 61 72 67 65 72 20 74 | 68 61 6e 20 74 68 65 20 |larger t|han the |
|00000400| 76 69 65 77 52 65 63 74 | 2c 0d 5c 20 61 6e 64 20 |viewRect|,.\ and |
|00000410| 73 63 72 6f 6c 6c 69 6e | 67 20 61 6d 6f 75 6e 74 |scrollin|g amount|
|00000420| 73 20 74 6f 20 73 68 69 | 66 74 69 6e 67 20 74 68 |s to shi|fting th|
|00000430| 65 20 63 68 69 6c 64 20 | 76 69 65 77 73 20 28 61 |e child |views (a|
|00000440| 6e 64 20 50 61 6e 52 65 | 63 74 29 20 61 72 6f 75 |nd PanRe|ct) arou|
|00000450| 6e 64 20 77 69 74 68 69 | 6e 0d 5c 20 74 68 65 20 |nd withi|n.\ the |
|00000460| 76 69 65 77 52 65 63 74 | 20 2d 20 77 68 69 63 68 |viewRect| - which|
|00000470| 2c 20 66 72 6f 6d 20 61 | 6e 6f 74 68 65 72 20 70 |, from a|nother p|
|00000480| 6f 69 6e 74 20 6f 66 20 | 76 69 65 77 2c 20 63 61 |oint of |view, ca|
|00000490| 6e 20 62 65 20 74 68 6f | 75 67 68 74 20 6f 66 20 |n be tho|ught of |
|000004a0| 61 73 0d 5c 20 22 70 61 | 6e 6e 69 6e 67 22 20 74 |as.\ "pa|nning" t|
|000004b0| 68 65 20 76 69 65 77 52 | 65 63 74 20 6f 76 65 72 |he viewR|ect over|
|000004c0| 20 74 68 65 20 50 61 6e | 52 65 63 74 20 61 72 65 | the Pan|Rect are|
|000004d0| 61 2e 0d 0d 5c 20 4d 76 | 69 65 77 20 68 61 73 20 |a...\ Mv|iew has |
|000004e0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 6d 65 74 68 |appropri|ate meth|
|000004f0| 6f 64 73 20 66 6f 72 20 | 72 65 74 75 72 6e 69 6e |ods for |returnin|
|00000500| 67 20 74 68 65 20 64 69 | 73 74 61 6e 63 65 73 20 |g the di|stances |
|00000510| 62 79 20 77 68 69 63 68 | 20 50 61 6e 52 65 63 74 |by which| PanRect|
|00000520| 0d 5c 20 66 61 6c 6c 73 | 20 6f 75 74 73 69 64 65 |.\ falls| outside|
|00000530| 20 74 68 65 20 76 69 65 | 77 52 65 63 74 20 61 72 | the vie|wRect ar|
|00000540| 65 61 2c 20 73 6f 20 74 | 68 61 74 20 74 68 65 20 |ea, so t|hat the |
|00000550| 70 61 72 65 6e 74 20 53 | 63 72 6f 6c 6c 65 72 20 |parent S|croller |
|00000560| 63 61 6e 20 73 65 74 20 | 74 68 65 0d 5c 20 73 63 |can set |the.\ sc|
|00000570| 72 6f 6c 6c 20 62 61 72 | 20 76 61 6c 75 65 73 20 |roll bar| values |
|00000580| 61 70 70 72 6f 70 72 69 | 61 74 65 6c 79 2e 0d 0d |appropri|ately...|
|00000590| 5c 20 4f 6e 65 20 75 6e | 75 73 75 61 6c 20 74 68 |\ One un|usual th|
|000005a0| 69 6e 67 20 77 65 20 64 | 6f 20 68 65 72 65 20 69 |ing we d|o here i|
|000005b0| 73 20 74 6f 20 6f 76 65 | 72 72 69 64 65 20 61 64 |s to ove|rride ad|
|000005c0| 64 56 69 65 77 3a 20 6f | 6e 20 53 63 72 6f 6c 6c |dView: o|n Scroll|
|000005d0| 65 72 20 73 6f 20 74 68 | 61 74 20 69 74 0d 5c 20 |er so th|at it.\ |
|000005e0| 62 65 63 6f 6d 65 73 20 | 61 6e 20 41 44 44 56 49 |becomes |an ADDVI|
|000005f0| 45 57 3a 20 6f 6e 20 4d | 61 69 6e 56 69 65 77 2c |EW: on M|ainView,|
|00000600| 20 73 69 6e 63 65 20 74 | 68 69 73 20 69 73 20 75 | since t|his is u|
|00000610| 73 75 61 6c 6c 79 20 77 | 68 61 74 20 77 65 20 72 |sually w|hat we r|
|00000620| 65 61 6c 6c 79 20 6d 65 | 61 6e 2e 0d 5c 20 49 6e |eally me|an..\ In|
|00000630| 20 74 68 65 20 63 61 73 | 65 20 77 68 65 72 65 20 | the cas|e where |
|00000640| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 72 65 61 6c |you want| to real|
|00000650| 6c 79 20 61 64 64 56 69 | 65 77 3a 20 6f 6e 20 74 |ly addVi|ew: on t|
|00000660| 68 65 20 53 63 72 6f 6c | 6c 65 72 2c 20 73 75 63 |he Scrol|ler, suc|
|00000670| 68 20 61 73 20 74 6f 20 | 61 64 64 0d 5c 20 61 6e |h as to |add.\ an|
|00000680| 6f 74 68 65 72 20 63 68 | 69 6c 64 20 76 69 65 77 |other ch|ild view|
|00000690| 20 61 6c 6f 6e 67 73 69 | 64 65 20 6f 6e 65 20 6f | alongsi|de one o|
|000006a0| 66 20 74 68 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |f the sc|roll bar|
|000006b0| 73 2c 20 79 6f 75 20 73 | 68 6f 75 6c 64 20 73 75 |s, you s|hould su|
|000006c0| 62 63 6c 61 73 73 0d 5c | 20 53 63 72 6f 6c 6c 65 |bclass.\| Scrolle|
|000006d0| 72 20 77 69 74 68 20 74 | 68 65 20 65 78 74 72 61 |r with t|he extra|
|000006e0| 20 76 69 65 77 73 20 61 | 73 20 69 76 61 72 73 2c | views a|s ivars,|
|000006f0| 20 61 6e 64 20 61 74 20 | 72 75 6e 20 74 69 6d 65 | and at |run time|
|00000700| 20 64 6f 20 61 64 64 56 | 69 65 77 3a 20 73 75 70 | do addV|iew: sup|
|00000710| 65 72 0d 5c 20 61 73 20 | 77 65 20 64 6f 20 66 6f |er.\ as |we do fo|
|00000720| 72 20 74 68 65 20 73 63 | 72 6f 6c 6c 20 62 61 72 |r the sc|roll bar|
|00000730| 73 20 28 73 65 65 20 74 | 68 65 20 4e 45 57 3a 20 |s (see t|he NEW: |
|00000740| 6d 65 74 68 6f 64 29 2e | 0d 0d 5c 20 41 6e 6f 74 |method).|..\ Anot|
|00000750| 68 65 72 20 61 70 70 72 | 6f 61 63 68 20 77 65 20 |her appr|oach we |
|00000760| 63 6f 75 6c 64 20 68 61 | 76 65 20 74 61 6b 65 6e |could ha|ve taken|
|00000770| 20 74 6f 20 69 6d 70 6c | 65 6d 65 6e 74 69 6e 67 | to impl|ementing|
|00000780| 20 4d 61 69 6e 56 69 65 | 77 20 77 6f 75 6c 64 20 | MainVie|w would |
|00000790| 68 61 76 65 20 62 65 65 | 6e 0d 5c 20 61 73 20 61 |have bee|n.\ as a|
|000007a0| 20 70 6f 69 6e 74 65 72 | 2c 20 77 69 74 68 20 6c | pointer|, with l|
|000007b0| 61 74 65 20 62 69 6e 64 | 69 6e 67 2e 20 20 54 68 |ate bind|ing. Th|
|000007c0| 61 74 20 77 61 79 20 4d | 61 69 6e 56 69 65 77 20 |at way M|ainView |
|000007d0| 63 6f 75 6c 64 20 68 61 | 76 65 20 62 65 65 6e 20 |could ha|ve been |
|000007e0| 61 6e 79 0d 5c 20 76 69 | 65 77 20 73 75 62 63 6c |any.\ vi|ew subcl|
|000007f0| 61 73 73 2e 20 20 54 68 | 61 74 20 77 6f 75 6c 64 |ass. Th|at would|
|00000800| 20 68 61 76 65 20 62 65 | 65 6e 20 6d 6f 72 65 20 | have be|en more |
|00000810| 66 6c 65 78 69 62 6c 65 | 2c 20 62 75 74 20 70 6f |flexible|, but po|
|00000820| 73 73 69 62 6c 79 20 6f | 76 65 72 6b 69 6c 6c 0d |ssibly o|verkill.|
|00000830| 5c 20 66 6f 72 20 77 68 | 61 74 20 77 65 20 75 73 |\ for wh|at we us|
|00000840| 75 61 6c 6c 79 20 77 61 | 6e 74 20 74 6f 20 64 6f |ually wa|nt to do|
|00000850| 20 2d 20 69 74 20 77 6f | 75 6c 64 20 68 61 76 65 | - it wo|uld have|
|00000860| 20 72 65 71 75 69 72 65 | 64 20 61 20 6d 6f 72 65 | require|d a more|
|00000870| 20 63 6f 6d 70 6c 65 78 | 0d 5c 20 73 65 74 74 69 | complex|.\ setti|
|00000880| 6e 67 2d 75 70 20 70 72 | 6f 63 65 73 73 2c 20 77 |ng-up pr|ocess, w|
|00000890| 69 74 68 20 74 68 65 20 | 4d 61 69 6e 56 69 65 77 |ith the |MainView|
|000008a0| 20 61 64 64 72 65 73 73 | 20 68 61 76 69 6e 67 20 | address| having |
|000008b0| 74 6f 20 62 65 20 70 61 | 73 73 65 64 20 69 6e 20 |to be pa|ssed in |
|000008c0| 61 66 74 65 72 0d 5c 20 | 4e 45 57 3a 20 68 61 73 |after.\ |NEW: has|
|000008d0| 20 62 65 65 6e 20 64 6f | 6e 65 2e 20 20 42 75 74 | been do|ne. But|
|000008e0| 20 69 66 20 79 6f 75 20 | 6e 65 65 64 20 74 68 65 | if you |need the|
|000008f0| 20 65 78 74 72 61 20 66 | 6c 65 78 69 62 69 6c 69 | extra f|lexibili|
|00000900| 74 79 2c 20 66 65 65 6c | 20 66 72 65 65 20 74 6f |ty, feel| free to|
|00000910| 20 63 6c 6f 6e 65 0d 5c | 20 53 63 72 6f 6c 6c 65 | clone.\| Scrolle|
|00000920| 72 20 61 6e 64 20 6d 61 | 6b 65 20 74 68 65 20 63 |r and ma|ke the c|
|00000930| 68 61 6e 67 65 73 21 0d | 0d 5c 20 50 61 6e 52 65 |hanges!.|.\ PanRe|
|00000940| 63 74 20 63 61 6e 20 6f | 62 76 69 6f 75 73 6c 79 |ct can o|bviously|
|00000950| 20 62 65 20 76 65 72 79 | 20 62 69 67 2c 20 73 6f | be very| big, so|
|00000960| 20 77 65 20 64 6f 6e 27 | 74 20 69 6d 70 6c 65 6d | we don'|t implem|
|00000970| 65 6e 74 20 69 74 20 61 | 73 20 61 20 72 65 67 75 |ent it a|s a regu|
|00000980| 6c 61 72 20 72 65 63 74 | 2c 0d 5c 20 62 75 74 20 |lar rect|,.\ but |
|00000990| 64 65 66 69 6e 65 20 61 | 20 6e 65 77 20 63 6c 61 |define a| new cla|
|000009a0| 73 73 2c 20 42 69 67 52 | 65 63 74 2c 20 77 68 69 |ss, BigR|ect, whi|
|000009b0| 63 68 20 75 73 65 73 20 | 76 61 72 73 20 72 61 74 |ch uses |vars rat|
|000009c0| 68 65 72 20 74 68 61 6e | 20 69 6e 74 73 20 66 6f |her than| ints fo|
|000009d0| 72 20 74 68 65 0d 5c 20 | 63 6f 6f 72 64 69 6e 61 |r the.\ |coordina|
|000009e0| 74 65 73 2e 0d 0d 0d 0d | 30 09 76 61 6c 75 65 09 |tes.....|0.value.|
|000009f0| 43 6c 69 63 6b 65 64 53 | 63 72 6f 6c 6c 65 72 0d |ClickedS|croller.|
|00000a00| 09 09 09 09 5c 20 43 4c | 49 43 4b 3a 20 6f 6e 20 |....\ CL|ICK: on |
|00000a10| 61 20 53 63 72 6f 6c 6c | 65 72 20 70 75 74 73 20 |a Scroll|er puts |
|00000a20| 74 68 65 20 53 63 72 6f | 6c 6c 65 72 27 73 20 61 |the Scro|ller's a|
|00000a30| 64 64 72 20 68 65 72 65 | 2c 20 73 6f 0d 09 09 09 |ddr here|, so....|
|00000a40| 09 5c 20 63 68 69 6c 64 | 20 76 69 65 77 73 20 63 |.\ child| views c|
|00000a50| 61 6e 20 65 61 73 69 6c | 79 20 73 65 6e 64 20 6d |an easil|y send m|
|00000a60| 65 73 73 61 67 65 73 20 | 62 61 63 6b 20 74 6f 20 |essages |back to |
|00000a70| 74 68 65 20 63 6c 69 63 | 6b 65 64 0d 09 09 09 09 |the clic|ked.....|
|00000a80| 5c 20 53 63 72 6f 6c 6c | 65 72 2e 20 20 53 63 72 |\ Scroll|er. Scr|
|00000a90| 6f 6c 6c 20 62 61 72 73 | 20 75 73 65 20 74 68 69 |oll bars| use thi|
|00000aa0| 73 2c 20 61 6c 73 6f 20 | 54 65 78 74 45 64 69 74 |s, also |TextEdit|
|00000ab0| 20 76 69 65 77 73 2e 0d | 09 09 09 09 5c 20 49 20 | views..|....\ I |
|00000ac0| 63 6f 75 6c 64 20 68 61 | 76 65 20 6a 75 73 74 20 |could ha|ve just |
|00000ad0| 75 73 65 64 20 54 68 69 | 73 43 74 6c 2c 20 62 75 |used Thi|sCtl, bu|
|00000ae0| 74 20 69 66 20 61 6e 6f | 74 68 65 72 20 63 6f 6e |t if ano|ther con|
|00000af0| 74 72 6f 6c 0d 09 09 09 | 09 5c 20 69 73 20 69 6e |trol....|.\ is in|
|00000b00| 76 6f 6c 76 65 64 20 73 | 6f 6d 65 77 68 65 72 65 |volved s|omewhere|
|00000b10| 20 69 74 20 6d 69 67 68 | 74 20 67 65 74 20 63 6c | it migh|t get cl|
|00000b20| 6f 62 62 65 72 65 64 2e | 20 20 55 6e 6c 69 6b 65 |obbered.| Unlike|
|00000b30| 6c 79 2c 0d 09 09 09 09 | 5c 20 62 75 74 20 49 27 |ly,.....|\ but I'|
|00000b40| 6d 20 61 20 63 61 75 74 | 69 6f 75 73 20 69 6e 64 |m a caut|ious ind|
|00000b50| 69 76 69 64 75 61 6c 2e | 0d 0d 3a 20 31 52 09 31 |ividual.|..: 1R.1|
|00000b60| 52 69 67 68 74 3a 09 09 | 63 6c 69 63 6b 65 64 53 |Right:..|clickedS|
|00000b70| 63 72 6f 6c 6c 65 72 20 | 20 3b 0d 3a 20 31 4c 09 |croller | ;.: 1L.|
|00000b80| 31 4c 65 66 74 3a 09 09 | 63 6c 69 63 6b 65 64 53 |1Left:..|clickedS|
|00000b90| 63 72 6f 6c 6c 65 72 20 | 20 3b 0d 3a 20 31 55 09 |croller | ;.: 1U.|
|00000ba0| 31 55 70 3a 09 09 63 6c | 69 63 6b 65 64 53 63 72 |1Up:..cl|ickedScr|
|00000bb0| 6f 6c 6c 65 72 20 20 3b | 0d 3a 20 31 44 09 31 44 |oller ;|.: 1D.1D|
|00000bc0| 6f 77 6e 3a 09 09 63 6c | 69 63 6b 65 64 53 63 72 |own:..cl|ickedScr|
|00000bd0| 6f 6c 6c 65 72 20 20 3b | 0d 0d 3a 20 50 47 52 09 |oller ;|..: PGR.|
|00000be0| 70 67 52 69 67 68 74 3a | 09 63 6c 69 63 6b 65 64 |pgRight:|.clicked|
|00000bf0| 53 63 72 6f 6c 6c 65 72 | 20 20 3b 0d 3a 20 50 47 |Scroller| ;.: PG|
|00000c00| 4c 09 70 67 4c 65 66 74 | 3a 09 09 63 6c 69 63 6b |L.pgLeft|:..click|
|00000c10| 65 64 53 63 72 6f 6c 6c | 65 72 20 20 3b 0d 3a 20 |edScroll|er ;.: |
|00000c20| 50 47 55 09 70 67 55 70 | 3a 09 09 63 6c 69 63 6b |PGU.pgUp|:..click|
|00000c30| 65 64 53 63 72 6f 6c 6c | 65 72 20 20 3b 0d 3a 20 |edScroll|er ;.: |
|00000c40| 50 47 44 09 70 67 44 6f | 77 6e 3a 09 09 63 6c 69 |PGD.pgDo|wn:..cli|
|00000c50| 63 6b 65 64 53 63 72 6f | 6c 6c 65 72 20 20 3b 0d |ckedScro|ller ;.|
|00000c60| 0d 3a 20 56 44 09 56 64 | 72 61 67 3a 09 09 63 6c |.: VD.Vd|rag:..cl|
|00000c70| 69 63 6b 65 64 53 63 72 | 6f 6c 6c 65 72 20 20 3b |ickedScr|oller ;|
|00000c80| 0d 3a 20 48 44 09 48 64 | 72 61 67 3a 09 09 63 6c |.: HD.Hd|rag:..cl|
|00000c90| 69 63 6b 65 64 53 63 72 | 6f 6c 6c 65 72 20 20 3b |ickedScr|oller ;|
|00000ca0| 0d 0d 0d 0d 0d 5c 09 09 | 09 3d 3d 3d 3d 3d 3d 3d |.....\..|.=======|
|00000cb0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 20 42 69 67 52 65 |========|== BigRe|
|00000cc0| 63 74 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ct =====|========|
|00000cd0| 3d 3d 3d 3d 3d 3d 0d 0d | 5c 20 42 49 47 52 45 43 |======..|\ BIGREC|
|00000ce0| 54 20 69 73 20 65 78 61 | 63 74 6c 79 20 74 68 61 |T is exa|ctly tha|
|00000cf0| 74 20 2d 2d 20 75 73 69 | 6e 67 20 76 61 72 73 20 |t -- usi|ng vars |
|00000d00| 72 61 74 68 65 72 20 74 | 68 61 6e 20 69 6e 74 73 |rather t|han ints|
|00000d10| 20 66 6f 72 20 74 68 65 | 0d 5c 20 63 6f 6f 72 64 | for the|.\ coord|
|00000d20| 69 6e 61 74 65 73 2e 20 | 20 54 68 65 20 74 6f 6f |inates. | The too|
|00000d30| 6c 62 6f 78 20 64 6f 65 | 73 6e 27 74 20 73 75 70 |lbox doe|sn't sup|
|00000d40| 70 6f 72 74 20 74 68 69 | 73 2c 20 73 6f 20 77 65 |port thi|s, so we|
|00000d50| 20 6a 75 73 74 20 75 73 | 65 0d 5c 20 69 74 20 69 | just us|e.\ it i|
|00000d60| 6e 20 70 6c 61 63 65 73 | 20 77 68 65 72 65 20 77 |n places| where w|
|00000d70| 65 20 6e 65 65 64 20 76 | 65 72 79 20 62 69 67 20 |e need v|ery big |
|00000d80| 72 65 63 74 61 6e 67 6c | 65 73 20 61 6e 64 20 63 |rectangl|es and c|
|00000d90| 6f 6e 74 72 6f 6c 0d 5c | 20 65 76 65 72 79 74 68 |ontrol.\| everyth|
|00000da0| 69 6e 67 20 6f 75 72 73 | 65 6c 76 65 73 2e 20 20 |ing ours|elves. |
|00000db0| 53 6f 20 66 61 72 20 77 | 65 20 6f 6e 6c 79 20 6e |So far w|e only n|
|00000dc0| 65 65 64 20 74 6f 20 73 | 75 70 70 6f 72 74 20 47 |eed to s|upport G|
|00000dd0| 45 54 3a 2c 20 50 55 54 | 3a 0d 5c 20 61 6e 64 20 |ET:, PUT|:.\ and |
|00000de0| 53 48 49 46 54 3a 20 6d | 65 74 68 6f 64 73 2e 0d |SHIFT: m|ethods..|
|00000df0| 0d 3a 63 6c 61 73 73 20 | 20 42 49 47 52 45 43 54 |.:class | BIGRECT|
|00000e00| 20 20 73 75 70 65 72 7b | 20 6f 62 6a 65 63 74 20 | super{| object |
|00000e10| 7d 0d 72 65 63 6f 72 64 | 0d 7b 09 76 61 72 09 09 |}.record|.{.var..|
|00000e20| 54 4f 50 0d 09 76 61 72 | 09 09 4c 45 46 54 0d 09 |TOP..var|..LEFT..|
|00000e30| 76 61 72 09 09 42 4f 54 | 54 4f 4d 0d 09 76 61 72 |var..BOT|TOM..var|
|00000e40| 09 09 52 49 47 48 54 0d | 7d 0d 0d 3a 6d 20 47 45 |..RIGHT.|}..:m GE|
|00000e50| 54 3a 09 09 67 65 74 3a | 20 6c 65 66 74 20 20 67 |T:..get:| left g|
|00000e60| 65 74 3a 20 74 6f 70 20 | 20 67 65 74 3a 20 72 69 |et: top | get: ri|
|00000e70| 67 68 74 20 20 67 65 74 | 3a 20 62 6f 74 74 6f 6d |ght get|: bottom|
|00000e80| 20 20 3b 6d 0d 3a 6d 20 | 50 55 54 3a 09 09 70 75 | ;m.:m |PUT:..pu|
|00000e90| 74 3a 20 62 6f 74 74 6f | 6d 20 20 70 75 74 3a 20 |t: botto|m put: |
|00000ea0| 72 69 67 68 74 20 20 70 | 75 74 3a 20 74 6f 70 20 |right p|ut: top |
|00000eb0| 20 70 75 74 3a 20 6c 65 | 66 74 20 20 3b 6d 0d 0d | put: le|ft ;m..|
|00000ec0| 3a 6d 20 53 48 49 46 54 | 3a 20 20 7b 20 64 78 20 |:m SHIFT|: { dx |
|00000ed0| 64 79 20 2d 2d 20 7d 0d | 09 64 78 20 64 79 20 6f |dy -- }.|.dx dy o|
|00000ee0| 72 20 20 30 45 58 49 54 | 0d 09 64 78 20 2b 3a 20 |r 0EXIT|..dx +: |
|00000ef0| 6c 65 66 74 20 20 64 78 | 20 2b 3a 20 72 69 67 68 |left dx| +: righ|
|00000f00| 74 0d 09 64 79 20 2b 3a | 20 74 6f 70 20 20 20 64 |t..dy +:| top d|
|00000f10| 79 20 2b 3a 20 62 6f 74 | 74 6f 6d 20 20 3b 6d 0d |y +: bot|tom ;m.|
|00000f20| 09 0d 3a 6d 20 49 4e 53 | 45 54 3a 20 20 7b 20 64 |..:m INS|ET: { d|
|00000f30| 78 20 64 79 20 2d 2d 20 | 7d 0d 09 64 78 20 2b 3a |x dy -- |}..dx +:|
|00000f40| 20 6c 65 66 74 20 20 64 | 78 20 2d 3a 20 72 69 67 | left d|x -: rig|
|00000f50| 68 74 0d 09 64 79 20 2b | 3a 20 74 6f 70 20 20 20 |ht..dy +|: top |
|00000f60| 64 79 20 2d 3a 20 62 6f | 74 74 6f 6d 20 20 3b 6d |dy -: bo|ttom ;m|
|00000f70| 0d 0d 3b 63 6c 61 73 73 | 0d 0d 0d 5c 09 09 09 3d |..;class|...\...=|
|00000f80| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000f90| 20 4d 76 69 65 77 20 3d | 3d 3d 3d 3d 3d 3d 3d 3d | Mview =|========|
|00000fa0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 0d 0d 5c 20 4d 56 |========|==..\ MV|
|00000fb0| 49 45 57 20 69 73 20 61 | 20 76 69 65 77 20 77 68 |IEW is a| view wh|
|00000fc0| 69 63 68 20 77 65 20 75 | 73 65 20 66 6f 72 20 74 |ich we u|se for t|
|00000fd0| 68 65 20 6d 61 69 6e 20 | 76 69 65 77 20 6f 66 20 |he main |view of |
|00000fe0| 61 20 53 63 72 6f 6c 6c | 65 72 20 28 74 68 65 20 |a Scroll|er (the |
|00000ff0| 76 69 65 77 0d 5c 20 77 | 69 74 68 20 74 68 65 20 |view.\ w|ith the |
|00001000| 61 63 74 75 61 6c 20 63 | 6f 6e 74 65 6e 74 73 20 |actual c|ontents |
|00001010| 2d 20 74 68 65 20 6f 74 | 68 65 72 20 74 77 6f 20 |- the ot|her two |
|00001020| 76 69 65 77 73 20 61 72 | 65 20 74 68 65 20 74 77 |views ar|e the tw|
|00001030| 6f 20 73 63 72 6f 6c 6c | 0d 5c 20 62 61 72 73 29 |o scroll|.\ bars)|
|00001040| 2e 20 20 49 74 20 68 61 | 73 20 6d 65 74 68 6f 64 |. It ha|s method|
|00001050| 73 20 74 6f 20 73 68 69 | 66 74 20 69 74 73 20 63 |s to shi|ft its c|
|00001060| 68 69 6c 64 72 65 6e 2c | 20 6f 72 2c 20 64 65 70 |hildren,| or, dep|
|00001070| 65 6e 64 69 6e 67 20 6f | 6e 0d 5c 20 74 68 65 20 |ending o|n.\ the |
|00001080| 70 6f 69 6e 74 20 6f 66 | 20 76 69 65 77 2c 20 22 |point of| view, "|
|00001090| 70 61 6e 6e 69 6e 67 22 | 20 6f 76 65 72 20 74 68 |panning"| over th|
|000010a0| 65 20 63 68 69 6c 64 72 | 65 6e 2e 0d 0d 0d 3a 63 |e childr|en....:c|
|000010b0| 6c 61 73 73 20 20 4d 56 | 49 45 57 20 20 73 75 70 |lass MV|IEW sup|
|000010c0| 65 72 7b 20 76 69 65 77 | 20 7d 0d 72 65 63 6f 72 |er{ view| }.recor|
|000010d0| 64 0d 7b 09 62 69 67 72 | 65 63 74 09 09 50 41 4e |d.{.bigr|ect..PAN|
|000010e0| 52 45 43 54 09 09 5c 20 | 52 65 63 74 20 66 6f 72 |RECT..\ |Rect for|
|000010f0| 20 22 70 61 6e 6e 69 6e | 67 22 20 63 68 69 6c 64 | "pannin|g" child|
|00001100| 72 65 6e 2e 20 20 4f 75 | 67 68 74 20 74 6f 0d 09 |ren. Ou|ght to..|
|00001110| 09 09 09 09 09 09 5c 20 | 20 63 6f 6e 74 61 69 6e |......\ | contain|
|00001120| 20 61 6c 6c 20 6f 66 20 | 74 68 65 6d 2e 20 20 43 | all of |them. C|
|00001130| 61 6e 20 62 65 20 65 6e | 6f 72 6d 6f 75 73 2e 0d |an be en|ormous..|
|00001140| 7d 0d 0d 3a 6d 20 47 45 | 54 50 41 4e 52 45 43 54 |}..:m GE|TPANRECT|
|00001150| 3a 0d 09 67 65 74 3a 20 | 70 61 6e 52 65 63 74 20 |:..get: |panRect |
|00001160| 20 3b 6d 0d 09 0d 3a 6d | 20 50 55 54 50 41 4e 52 | ;m...:m| PUTPANR|
|00001170| 45 43 54 3a 0d 09 70 75 | 74 3a 20 70 61 6e 52 65 |ECT:..pu|t: panRe|
|00001180| 63 74 20 20 3b 6d 0d 0d | 0d 5c 20 53 48 49 46 54 |ct ;m..|.\ SHIFT|
|00001190| 43 48 49 4c 44 52 45 4e | 20 28 20 64 78 20 64 79 |CHILDREN| ( dx dy|
|000011a0| 20 2d 2d 20 29 20 20 6d | 6f 76 65 73 20 61 6c 6c | -- ) m|oves all|
|000011b0| 20 74 68 65 20 63 68 69 | 6c 64 20 76 69 65 77 73 | the chi|ld views|
|000011c0| 20 62 79 0d 5c 20 74 68 | 65 20 67 69 76 65 6e 20 | by.\ th|e given |
|000011d0| 64 69 73 74 61 6e 63 65 | 2e 20 20 57 65 20 64 6f |distance|. We do|
|000011e0| 20 74 68 69 73 20 62 79 | 20 63 68 61 6e 67 69 6e | this by| changin|
|000011f0| 67 20 74 68 65 69 72 20 | 62 6f 75 6e 64 73 20 61 |g their |bounds a|
|00001200| 70 70 72 6f 70 72 69 61 | 74 65 6c 79 0d 5c 20 74 |ppropria|tely.\ t|
|00001210| 68 65 6e 20 63 61 6c 6c | 69 6e 67 20 4d 4f 56 45 |hen call|ing MOVE|
|00001220| 44 3a 2e 0d 0d 3a 6d 20 | 53 48 49 46 54 43 48 49 |D:...:m |SHIFTCHI|
|00001230| 4c 44 52 45 4e 3a 20 20 | 7b 20 64 78 20 64 79 20 |LDREN: |{ dx dy |
|00001240| 5c 20 74 68 65 43 68 69 | 6c 64 20 6c 20 74 20 72 |\ theChi|ld l t r|
|00001250| 20 62 20 2d 2d 20 7d 0d | 09 42 45 47 49 4e 20 20 | b -- }.|.BEGIN |
|00001260| 65 61 63 68 3a 20 63 68 | 69 6c 64 72 65 6e 0d 09 |each: ch|ildren..|
|00001270| 57 48 49 4c 45 0d 09 09 | 2d 3e 20 74 68 65 43 68 |WHILE...|-> theCh|
|00001280| 69 6c 64 0d 09 09 74 68 | 65 43 68 69 6c 64 20 67 |ild...th|eChild g|
|00001290| 65 74 42 6f 75 6e 64 73 | 3a 20 76 69 65 77 20 20 |etBounds|: view |
|000012a0| 2d 3e 20 62 20 20 2d 3e | 20 72 20 20 2d 3e 20 74 |-> b ->| r -> t|
|000012b0| 20 20 2d 3e 20 6c 0d 09 | 09 64 78 20 2b 2b 3e 20 | -> l..|.dx ++> |
|000012c0| 6c 20 20 64 78 20 2b 2b | 3e 20 72 0d 09 09 64 79 |l dx ++|> r...dy|
|000012d0| 20 2b 2b 3e 20 74 20 20 | 64 79 20 2b 2b 3e 20 62 | ++> t |dy ++> b|
|000012e0| 0d 09 09 6c 20 74 20 72 | 20 62 20 20 74 68 65 43 |...l t r| b theC|
|000012f0| 68 69 6c 64 20 20 73 65 | 74 42 6f 75 6e 64 73 3a |hild se|tBounds:|
|00001300| 20 76 69 65 77 0d 09 09 | 6d 6f 76 65 64 3a 20 74 | view...|moved: t|
|00001310| 68 65 43 68 69 6c 64 09 | 09 5c 20 6c 61 74 65 20 |heChild.|.\ late |
|00001320| 62 69 6e 64 20 68 65 72 | 65 20 61 73 20 64 69 66 |bind her|e as dif|
|00001330| 66 65 72 65 6e 74 20 74 | 68 69 6e 67 73 20 6d 61 |ferent t|hings ma|
|00001340| 79 20 68 61 70 70 65 6e | 0d 09 52 45 50 45 41 54 |y happen|..REPEAT|
|00001350| 20 20 3b 6d 0d 0d 70 72 | 69 76 61 74 65 0d 09 0d | ;m..pr|ivate...|
|00001360| 3a 6d 20 48 6f 77 46 61 | 72 3a 20 20 7b 20 6f 66 |:m HowFa|r: { of|
|00001370| 66 73 31 20 6f 66 66 73 | 32 20 2d 2d 20 6f 66 66 |fs1 offs|2 -- off|
|00001380| 73 27 20 7d 0d 09 6f 66 | 66 73 31 20 6f 66 66 73 |s' }..of|fs1 offs|
|00001390| 32 20 78 6f 72 20 30 3e | 09 09 09 09 09 5c 20 53 |2 xor 0>|.....\ S|
|000013a0| 61 6d 65 20 73 69 67 6e | 3f 0d 09 49 46 09 09 6f |ame sign|?..IF..o|
|000013b0| 66 66 73 31 20 20 6f 66 | 66 73 32 20 64 75 70 20 |ffs1 of|fs2 dup |
|000013c0| 30 3c 0d 09 09 09 49 46 | 20 20 6d 61 78 20 20 65 |0<....IF| max e|
|000013d0| 6c 73 65 20 20 6d 69 6e | 20 20 54 48 45 4e 0d 09 |lse min| THEN..|
|000013e0| 45 4c 53 45 09 30 0d 09 | 54 48 45 4e 20 20 3b 6d |ELSE.0..|THEN ;m|
|000013f0| 0d 0d 5c 20 43 6f 65 72 | 63 65 50 61 6e 52 65 63 |..\ Coer|cePanRec|
|00001400| 74 3a 20 73 68 69 66 74 | 73 20 74 68 65 20 63 68 |t: shift|s the ch|
|00001410| 69 6c 64 72 65 6e 20 73 | 6f 20 74 68 61 74 20 70 |ildren s|o that p|
|00001420| 61 6e 52 65 63 74 20 66 | 61 6c 6c 73 20 61 73 20 |anRect f|alls as |
|00001430| 66 61 72 0d 5c 20 77 69 | 74 68 69 6e 20 74 68 65 |far.\ wi|thin the|
|00001440| 20 76 69 65 77 52 65 63 | 74 20 61 73 20 70 6f 73 | viewRec|t as pos|
|00001450| 73 69 62 6c 65 2e 20 20 | 57 65 20 66 61 63 74 6f |sible. |We facto|
|00001460| 72 20 6f 75 74 20 28 43 | 6f 65 72 63 65 50 61 6e |r out (C|oercePan|
|00001470| 52 65 63 74 29 3a 0d 5c | 20 77 68 69 63 68 20 64 |Rect):.\| which d|
|00001480| 6f 65 73 20 74 68 65 20 | 62 61 73 69 63 20 73 74 |oes the |basic st|
|00001490| 75 66 66 20 74 68 61 74 | 20 53 63 72 6f 6c 6c 65 |uff that| Scrolle|
|000014a0| 72 20 73 75 62 63 6c 61 | 73 73 65 73 20 63 61 6e |r subcla|sses can|
|000014b0| 20 75 73 65 2e 0d 0d 70 | 75 62 6c 69 63 0d 0d 3a | use...p|ublic..:|
|000014c0| 6d 20 28 43 6f 65 72 63 | 65 50 61 6e 52 65 63 74 |m (Coerc|ePanRect|
|000014d0| 29 3a 20 20 7b 20 5c 20 | 70 4c 65 66 74 20 70 54 |): { \ |pLeft pT|
|000014e0| 6f 70 20 70 52 74 20 70 | 42 6f 74 20 64 78 20 64 |op pRt p|Bot dx d|
|000014f0| 79 20 2d 2d 20 64 78 20 | 64 79 20 20 7d 0d 09 5c |y -- dx |dy }..\|
|00001500| 20 52 65 74 75 72 6e 73 | 20 74 68 65 20 61 6d 6f | Returns| the amo|
|00001510| 75 6e 74 20 77 65 20 68 | 61 76 65 20 74 6f 20 73 |unt we h|ave to s|
|00001520| 68 69 66 74 20 70 61 6e | 52 65 63 74 20 74 6f 20 |hift pan|Rect to |
|00001530| 67 65 74 20 69 74 20 69 | 6e 74 6f 0d 09 5c 20 74 |get it i|nto..\ t|
|00001540| 68 65 20 72 69 67 68 74 | 20 70 6f 73 69 74 69 6f |he right| positio|
|00001550| 6e 2e 20 20 57 65 20 70 | 61 73 73 20 69 6e 20 70 |n. We p|ass in p|
|00001560| 61 6e 52 65 63 74 27 73 | 20 63 6f 6f 72 64 69 6e |anRect's| coordin|
|00001570| 61 74 65 73 20 73 6f 20 | 74 68 61 74 0d 09 5c 20 |ates so |that..\ |
|00001580| 53 63 72 6f 6c 6c 65 72 | 20 73 75 62 63 6c 61 73 |Scroller| subclas|
|00001590| 73 65 73 20 63 61 6e 20 | 75 73 65 20 61 20 64 69 |ses can |use a di|
|000015a0| 66 66 65 72 65 6e 74 20 | 70 61 6e 52 65 63 74 20 |fferent |panRect |
|000015b0| 28 54 45 53 63 72 6f 6c | 6c 65 72 0d 09 5c 20 64 |(TEScrol|ler..\ d|
|000015c0| 6f 65 73 20 74 68 69 73 | 29 2e 0d 09 0d 09 67 65 |oes this|).....ge|
|000015d0| 74 3a 20 70 61 6e 52 65 | 63 74 20 20 2d 3e 20 70 |t: panRe|ct -> p|
|000015e0| 42 6f 74 20 2d 3e 20 70 | 52 74 20 2d 3e 20 70 54 |Bot -> p|Rt -> pT|
|000015f0| 6f 70 20 2d 3e 20 70 4c | 65 66 74 0d 09 67 65 74 |op -> pL|eft..get|
|00001600| 54 6f 70 58 3a 20 76 69 | 65 77 52 65 63 74 20 20 |TopX: vi|ewRect |
|00001610| 70 4c 65 66 74 20 2d 0d | 09 67 65 74 42 6f 74 58 |pLeft -.|.getBotX|
|00001620| 3a 20 76 69 65 77 52 65 | 63 74 20 20 70 52 74 20 |: viewRe|ct pRt |
|00001630| 20 20 2d 20 20 20 68 6f | 77 46 61 72 3a 20 73 65 | - ho|wFar: se|
|00001640| 6c 66 20 20 2d 3e 20 64 | 78 0d 09 67 65 74 54 6f |lf -> d|x..getTo|
|00001650| 70 59 3a 20 76 69 65 77 | 52 65 63 74 20 20 70 54 |pY: view|Rect pT|
|00001660| 6f 70 20 20 2d 0d 09 67 | 65 74 42 6f 74 59 3a 20 |op -..g|etBotY: |
|00001670| 76 69 65 77 52 65 63 74 | 20 20 70 42 6f 74 20 20 |viewRect| pBot |
|00001680| 2d 20 20 20 68 6f 77 46 | 61 72 3a 20 73 65 6c 66 |- howF|ar: self|
|00001690| 20 20 2d 3e 20 64 79 0d | 09 64 78 20 64 79 20 73 | -> dy.|.dx dy s|
|000016a0| 68 69 66 74 3a 20 70 61 | 6e 52 65 63 74 0d 09 64 |hift: pa|nRect..d|
|000016b0| 78 20 20 64 79 20 20 3b | 6d 0d 09 0d 0d 3a 6d 20 |x dy ;|m....:m |
|000016c0| 43 6f 65 72 63 65 50 61 | 6e 52 65 63 74 3a 20 20 |CoercePa|nRect: |
|000016d0| 7b 20 5c 20 64 78 20 64 | 79 20 2d 2d 20 7d 0d 09 |{ \ dx d|y -- }..|
|000016e0| 28 63 6f 65 72 63 65 50 | 61 6e 52 65 63 74 29 3a |(coerceP|anRect):|
|000016f0| 20 73 65 6c 66 20 20 2d | 3e 20 64 79 20 20 2d 3e | self -|> dy ->|
|00001700| 20 64 78 0d 09 64 78 20 | 64 79 20 6f 72 20 20 30 | dx..dx |dy or 0|
|00001710| 45 58 49 54 0d 09 64 78 | 20 64 79 20 20 73 68 69 |EXIT..dx| dy shi|
|00001720| 66 74 43 68 69 6c 64 72 | 65 6e 3a 20 73 65 6c 66 |ftChildr|en: self|
|00001730| 20 20 3b 6d 0d 0d 0d 5c | 20 48 65 72 65 20 77 65 | ;m...\| Here we|
|00001740| 20 64 65 66 69 6e 65 20 | 74 68 65 20 64 65 66 61 | define |the defa|
|00001750| 75 6c 74 20 70 61 6e 52 | 65 63 74 20 74 6f 20 62 |ult panR|ect to b|
|00001760| 65 20 74 68 65 20 72 65 | 63 74 20 77 68 69 63 68 |e the re|ct which|
|00001770| 20 6a 75 73 74 20 63 6f | 6e 74 61 69 6e 73 0d 5c | just co|ntains.\|
|00001780| 20 61 6c 6c 20 74 68 65 | 20 63 68 69 6c 64 20 76 | all the| child v|
|00001790| 69 65 77 73 2e 20 20 43 | 68 61 6e 67 65 20 61 73 |iews. C|hange as|
|000017a0| 20 6e 65 63 65 73 73 61 | 72 79 2e 0d 0d 3a 6d 20 | necessa|ry...:m |
|000017b0| 44 66 6c 74 50 61 6e 52 | 65 63 74 3a 20 20 7b 20 |DfltPanR|ect: { |
|000017c0| 5c 20 6c 65 66 74 20 74 | 6f 70 20 72 74 20 62 6f |\ left t|op rt bo|
|000017d0| 74 20 2d 2d 20 7d 0d 09 | 66 69 72 73 74 3f 3a 20 |t -- }..|first?: |
|000017e0| 63 68 69 6c 64 72 65 6e | 0d 09 4e 49 46 09 09 30 |children|..NIF..0|
|000017f0| 20 2d 3e 20 62 6f 74 20 | 20 30 20 2d 3e 20 72 74 | -> bot | 0 -> rt|
|00001800| 20 20 30 20 2d 3e 20 74 | 6f 70 20 20 30 20 2d 3e | 0 -> t|op 0 ->|
|00001810| 20 6c 65 66 74 0d 09 45 | 4c 53 45 09 67 65 74 52 | left..E|LSE.getR|
|00001820| 65 63 74 3a 20 5b 5d 20 | 20 2d 3e 20 62 6f 74 20 |ect: [] | -> bot |
|00001830| 20 2d 3e 20 72 74 20 20 | 2d 3e 20 74 6f 70 20 20 | -> rt |-> top |
|00001840| 2d 3e 20 6c 65 66 74 0d | 09 54 48 45 4e 0d 09 42 |-> left.|.THEN..B|
|00001850| 45 47 49 4e 09 65 61 63 | 68 3a 20 63 68 69 6c 64 |EGIN.eac|h: child|
|00001860| 72 65 6e 0d 09 57 48 49 | 4c 45 09 67 65 74 52 65 |ren..WHI|LE.getRe|
|00001870| 63 74 3a 20 5b 5d 0d 09 | 09 62 6f 74 20 6d 61 78 |ct: []..|.bot max|
|00001880| 20 2d 3e 20 62 6f 74 20 | 20 20 20 72 74 20 6d 61 | -> bot | rt ma|
|00001890| 78 20 2d 3e 20 72 74 0d | 09 09 74 6f 70 20 6d 69 |x -> rt.|..top mi|
|000018a0| 6e 20 2d 3e 20 74 6f 70 | 20 20 6c 65 66 74 20 6d |n -> top| left m|
|000018b0| 69 6e 20 2d 3e 20 6c 65 | 66 74 0d 09 52 45 50 45 |in -> le|ft..REPE|
|000018c0| 41 54 0d 09 6c 65 66 74 | 20 74 6f 70 20 72 74 20 |AT..left| top rt |
|000018d0| 62 6f 74 20 20 70 75 74 | 3a 20 70 61 6e 52 65 63 |bot put|: panRec|
|000018e0| 74 20 20 3b 6d 0d 0d 3b | 63 6c 61 73 73 0d 0d 0d |t ;m..;|class...|
|000018f0| 0d 5c 09 09 09 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.\...===|========|
|00001900| 3d 3d 3d 3d 3d 3d 20 53 | 63 72 6f 6c 6c 65 72 20 |====== S|croller |
|00001910| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00001920| 3d 3d 3d 0d 0d 5c 20 53 | 43 52 4f 4c 4c 45 52 20 |===..\ S|CROLLER |
|00001930| 69 73 20 61 20 76 69 65 | 77 20 77 68 69 63 68 20 |is a vie|w which |
|00001940| 68 61 73 20 73 75 70 70 | 6f 72 74 20 66 6f 72 20 |has supp|ort for |
|00001950| 61 20 76 65 72 74 69 63 | 61 6c 20 61 6e 64 20 68 |a vertic|al and h|
|00001960| 6f 72 69 7a 6f 6e 74 61 | 6c 0d 5c 20 73 63 72 6f |orizonta|l.\ scro|
|00001970| 6c 6c 20 62 61 72 20 61 | 6c 6f 6e 67 20 74 68 65 |ll bar a|long the|
|00001980| 20 72 69 67 68 74 20 68 | 61 6e 64 20 61 6e 64 20 | right h|and and |
|00001990| 62 6f 74 74 6f 6d 20 65 | 64 67 65 20 72 65 73 70 |bottom e|dge resp|
|000019a0| 65 63 74 69 76 65 6c 79 | 2e 0d 5c 20 45 69 74 68 |ectively|..\ Eith|
|000019b0| 65 72 20 6d 61 79 20 62 | 65 20 70 72 65 73 65 6e |er may b|e presen|
|000019c0| 74 20 6f 72 20 61 62 73 | 65 6e 74 2c 20 61 6e 64 |t or abs|ent, and|
|000019d0| 20 6d 61 79 20 68 61 76 | 65 20 61 6e 20 6f 66 66 | may hav|e an off|
|000019e0| 73 65 74 20 6f 72 20 67 | 61 70 0d 5c 20 61 74 20 |set or g|ap.\ at |
|000019f0| 65 69 74 68 65 72 20 65 | 6e 64 20 6f 66 20 61 20 |either e|nd of a |
|00001a00| 73 70 65 63 69 66 69 65 | 64 20 61 6d 6f 75 6e 74 |specifie|d amount|
|00001a10| 2e 0d 0d 3a 63 6c 61 73 | 73 09 53 43 52 4f 4c 4c |...:clas|s.SCROLL|
|00001a20| 45 52 20 20 73 75 70 65 | 72 7b 20 76 69 65 77 20 |ER supe|r{ view |
|00001a30| 7d 0d 0d 09 6d 76 69 65 | 77 09 4d 61 69 6e 56 69 |}...mvie|w.MainVi|
|00001a40| 65 77 09 09 5c 20 54 68 | 65 20 64 69 73 70 6c 61 |ew..\ Th|e displa|
|00001a50| 79 20 61 72 65 61 2c 20 | 6d 69 6e 75 73 20 74 68 |y area, |minus th|
|00001a60| 65 20 73 63 72 6f 6c 6c | 20 62 61 72 73 0d 09 76 |e scroll| bars..v|
|00001a70| 73 63 72 6f 6c 6c 09 54 | 68 65 56 73 63 72 6f 6c |scroll.T|heVscrol|
|00001a80| 6c 0d 09 68 73 63 72 6f | 6c 6c 09 54 68 65 48 73 |l..hscro|ll.TheHs|
|00001a90| 63 72 6f 6c 6c 0d 0d 72 | 65 63 6f 72 64 0d 7b 09 |croll..r|ecord.{.|
|00001aa0| 62 6f 6f 6c 09 76 73 63 | 72 6f 6c 6c 3f 09 09 5c |bool.vsc|roll?..\|
|00001ab0| 20 54 72 75 65 20 69 66 | 20 76 20 73 63 72 6f 6c | True if| v scrol|
|00001ac0| 6c 20 62 61 72 20 74 6f | 20 62 65 20 75 73 65 64 |l bar to| be used|
|00001ad0| 0d 09 62 6f 6f 6c 09 68 | 73 63 72 6f 6c 6c 3f 09 |..bool.h|scroll?.|
|00001ae0| 09 5c 20 54 72 75 65 20 | 69 66 20 68 20 73 63 72 |.\ True |if h scr|
|00001af0| 6f 6c 6c 20 62 61 72 20 | 74 6f 20 62 65 20 75 73 |oll bar |to be us|
|00001b00| 65 64 0d 09 62 6f 6f 6c | 09 55 73 65 50 61 6e 52 |ed..bool|.UsePanR|
|00001b10| 65 63 74 3f 09 09 5c 20 | 54 72 75 65 20 69 66 20 |ect?..\ |True if |
|00001b20| 77 65 27 72 65 20 74 6f | 20 75 73 65 20 50 61 6e |we're to| use Pan|
|00001b30| 52 65 63 74 0d 0d 09 76 | 61 72 09 09 48 50 41 4e |Rect...v|ar..HPAN|
|00001b40| 09 09 09 5c 20 48 6f 72 | 69 7a 6f 6e 74 61 6c 20 |...\ Hor|izontal |
|00001b50| 70 61 6e 6e 69 6e 67 20 | 72 61 6e 67 65 0d 09 76 |panning |range..v|
|00001b60| 61 72 09 09 48 50 4f 53 | 09 09 09 5c 20 43 75 72 |ar..HPOS|...\ Cur|
|00001b70| 72 65 6e 74 20 76 65 72 | 74 69 63 61 6c 20 70 6f |rent ver|tical po|
|00001b80| 73 6e 0d 09 76 61 72 09 | 09 56 50 41 4e 09 09 09 |sn..var.|.VPAN...|
|00001b90| 5c 20 56 65 72 74 69 63 | 61 6c 20 64 69 74 74 6f |\ Vertic|al ditto|
|00001ba0| 0d 09 76 61 72 09 09 56 | 50 4f 53 0d 0d 09 69 6e |..var..V|POS...in|
|00001bb0| 74 09 09 48 55 4e 49 54 | 09 09 09 5c 20 23 20 70 |t..HUNIT|...\ # p|
|00001bc0| 69 78 65 6c 73 20 66 6f | 72 20 6f 6e 65 20 68 6f |ixels fo|r one ho|
|00001bd0| 72 69 7a 6f 6e 74 61 6c | 20 61 72 72 6f 77 20 63 |rizontal| arrow c|
|00001be0| 6c 69 63 6b 0d 09 69 6e | 74 09 09 56 55 4e 49 54 |lick..in|t..VUNIT|
|00001bf0| 0d 7d 0d 0d 3a 6d 20 53 | 65 74 50 61 6e 52 61 6e |.}..:m S|etPanRan|
|00001c00| 67 65 73 3a 20 20 7b 20 | 5c 20 6c 65 66 74 20 74 |ges: { |\ left t|
|00001c10| 6f 70 20 72 74 20 62 6f | 74 20 70 4c 65 66 74 20 |op rt bo|t pLeft |
|00001c20| 70 54 6f 70 20 70 52 74 | 20 70 42 6f 74 20 2d 2d |pTop pRt| pBot --|
|00001c30| 20 7d 0d 09 6e 6f 43 6c | 69 70 0d 09 67 65 74 56 | }..noCl|ip..getV|
|00001c40| 69 65 77 52 65 63 74 3a | 20 6d 61 69 6e 56 69 65 |iewRect:| mainVie|
|00001c50| 77 20 20 2d 3e 20 62 6f | 74 20 20 2d 3e 20 72 74 |w -> bo|t -> rt|
|00001c60| 20 20 2d 3e 20 74 6f 70 | 20 20 2d 3e 20 6c 65 66 | -> top| -> lef|
|00001c70| 74 0d 09 67 65 74 50 61 | 6e 52 65 63 74 3a 20 6d |t..getPa|nRect: m|
|00001c80| 61 69 6e 56 69 65 77 20 | 20 2d 3e 20 70 42 6f 74 |ainView | -> pBot|
|00001c90| 20 20 2d 3e 20 70 52 74 | 20 20 2d 3e 20 70 54 6f | -> pRt| -> pTo|
|00001ca0| 70 20 20 2d 3e 20 70 4c | 65 66 74 0d 09 6c 65 66 |p -> pL|eft..lef|
|00001cb0| 74 20 70 4c 65 66 74 20 | 2d 20 20 64 75 70 20 20 |t pLeft |- dup |
|00001cc0| 30 20 6d 61 78 20 20 70 | 75 74 3a 20 48 70 6f 73 |0 max p|ut: Hpos|
|00001cd0| 0d 09 70 52 74 20 72 74 | 20 2d 20 20 2b 20 20 30 |..pRt rt| - + 0|
|00001ce0| 20 20 6d 61 78 20 20 70 | 75 74 3a 20 48 70 61 6e | max p|ut: Hpan|
|00001cf0| 0d 09 74 6f 70 20 70 54 | 6f 70 20 2d 20 20 64 75 |..top pT|op - du|
|00001d00| 70 20 20 30 20 6d 61 78 | 20 20 70 75 74 3a 20 56 |p 0 max| put: V|
|00001d10| 70 6f 73 0d 09 70 42 6f | 74 20 62 6f 74 20 2d 20 |pos..pBo|t bot - |
|00001d20| 20 2b 20 20 30 20 6d 61 | 78 20 20 70 75 74 3a 20 | + 0 ma|x put: |
|00001d30| 56 70 61 6e 0d 09 67 65 | 74 3a 20 76 73 63 72 6f |Vpan..ge|t: vscro|
|00001d40| 6c 6c 3f 0d 09 49 46 09 | 30 20 20 67 65 74 3a 20 |ll?..IF.|0 get: |
|00001d50| 76 70 61 6e 20 20 70 75 | 74 52 61 6e 67 65 3a 20 |vpan pu|tRange: |
|00001d60| 74 68 65 56 73 63 72 6f | 6c 6c 0d 09 09 67 65 74 |theVscro|ll...get|
|00001d70| 3a 20 76 70 61 6e 0d 09 | 09 49 46 09 67 65 74 3a |: vpan..|.IF.get:|
|00001d80| 20 76 70 6f 73 20 20 70 | 75 74 3a 20 74 68 65 56 | vpos p|ut: theV|
|00001d90| 73 63 72 6f 6c 6c 0d 09 | 09 09 65 6e 61 62 6c 65 |scroll..|..enable|
|00001da0| 3a 20 74 68 65 56 73 63 | 72 6f 6c 6c 0d 09 09 45 |: theVsc|roll...E|
|00001db0| 4c 53 45 0d 09 09 09 30 | 20 70 75 74 3a 20 74 68 |LSE....0| put: th|
|00001dc0| 65 56 73 63 72 6f 6c 6c | 0d 09 09 09 64 69 73 61 |eVscroll|....disa|
|00001dd0| 62 6c 65 3a 20 74 68 65 | 56 73 63 72 6f 6c 6c 0d |ble: the|Vscroll.|
|00001de0| 09 09 54 48 45 4e 0d 09 | 54 48 45 4e 0d 09 67 65 |..THEN..|THEN..ge|
|00001df0| 74 3a 20 68 73 63 72 6f | 6c 6c 3f 0d 09 49 46 09 |t: hscro|ll?..IF.|
|00001e00| 30 20 20 67 65 74 3a 20 | 68 70 61 6e 20 20 70 75 |0 get: |hpan pu|
|00001e10| 74 52 61 6e 67 65 3a 20 | 74 68 65 48 73 63 72 6f |tRange: |theHscro|
|00001e20| 6c 6c 0d 09 09 67 65 74 | 3a 20 68 70 61 6e 0d 09 |ll...get|: hpan..|
|00001e30| 09 49 46 09 67 65 74 3a | 20 68 70 6f 73 20 20 70 |.IF.get:| hpos p|
|00001e40| 75 74 3a 20 74 68 65 48 | 73 63 72 6f 6c 6c 0d 09 |ut: theH|scroll..|
|00001e50| 09 09 65 6e 61 62 6c 65 | 3a 20 74 68 65 48 73 63 |..enable|: theHsc|
|00001e60| 72 6f 6c 6c 0d 09 09 45 | 4c 53 45 0d 09 09 09 30 |roll...E|LSE....0|
|00001e70| 20 70 75 74 3a 20 74 68 | 65 48 73 63 72 6f 6c 6c | put: th|eHscroll|
|00001e80| 0d 09 09 09 64 69 73 61 | 62 6c 65 3a 20 74 68 65 |....disa|ble: the|
|00001e90| 48 73 63 72 6f 6c 6c 0d | 09 09 54 48 45 4e 0d 09 |Hscroll.|..THEN..|
|00001ea0| 54 48 45 4e 20 20 3b 6d | 0d 0d 0d 3a 6d 20 46 69 |THEN ;m|...:m Fi|
|00001eb0| 78 50 61 6e 52 65 63 74 | 3a 0d 09 67 65 74 3a 20 |xPanRect|:..get: |
|00001ec0| 75 73 65 50 61 6e 52 65 | 63 74 3f 20 20 4e 49 46 |usePanRe|ct? NIF|
|00001ed0| 20 20 64 66 6c 74 50 61 | 6e 52 65 63 74 3a 20 6d | dfltPa|nRect: m|
|00001ee0| 61 69 6e 56 69 65 77 20 | 20 54 48 45 4e 0d 09 63 |ainView | THEN..c|
|00001ef0| 6f 65 72 63 65 50 61 6e | 52 65 63 74 3a 20 6d 61 |oercePan|Rect: ma|
|00001f00| 69 6e 56 69 65 77 0d 09 | 73 65 74 50 61 6e 52 61 |inView..|setPanRa|
|00001f10| 6e 67 65 73 3a 20 73 65 | 6c 66 20 20 3b 6d 0d 0d |nges: se|lf ;m..|
|00001f20| 0d 3a 6d 20 46 69 78 4d | 61 69 6e 56 69 65 77 42 |.:m FixM|ainViewB|
|00001f30| 6f 75 6e 64 73 3a 0d 09 | 67 65 74 42 6f 75 6e 64 |ounds:..|getBound|
|00001f40| 73 3a 20 6d 61 69 6e 56 | 69 65 77 20 20 32 64 72 |s: mainV|iew 2dr|
|00001f50| 6f 70 09 09 5c 20 44 6f | 6e 27 74 20 63 68 61 6e |op..\ Do|n't chan|
|00001f60| 67 65 20 6c 65 66 74 20 | 6f 72 20 74 6f 70 0d 09 |ge left |or top..|
|00001f70| 2d 31 36 20 67 65 74 3a | 20 76 73 63 72 6f 6c 6c |-16 get:| vscroll|
|00001f80| 3f 20 61 6e 64 20 20 2d | 31 36 20 67 65 74 3a 20 |? and -|16 get: |
|00001f90| 68 73 63 72 6f 6c 6c 3f | 20 61 6e 64 0d 09 73 65 |hscroll?| and..se|
|00001fa0| 74 42 6f 75 6e 64 73 3a | 20 6d 61 69 6e 56 69 65 |tBounds:| mainVie|
|00001fb0| 77 20 20 3b 6d 0d 0d 0d | 3a 6d 20 46 69 78 48 73 |w ;m...|:m FixHs|
|00001fc0| 63 72 6f 6c 6c 42 6f 75 | 6e 64 73 3a 0d 09 30 20 |crollBou|nds:..0 |
|00001fd0| 2d 31 36 20 20 2d 31 35 | 20 67 65 74 3a 20 76 73 |-16 -15| get: vs|
|00001fe0| 63 72 6f 6c 6c 3f 20 61 | 6e 64 20 20 30 0d 09 73 |croll? a|nd 0..s|
|00001ff0| 65 74 42 6f 75 6e 64 73 | 3a 20 74 68 65 48 73 63 |etBounds|: theHsc|
|00002000| 72 6f 6c 6c 20 20 6d 6f | 76 65 64 3a 20 74 68 65 |roll mo|ved: the|
|00002010| 48 73 63 72 6f 6c 6c 20 | 20 3b 6d 0d 0d 3a 6d 20 |Hscroll | ;m..:m |
|00002020| 46 69 78 56 73 63 72 6f | 6c 6c 42 6f 75 6e 64 73 |FixVscro|llBounds|
|00002030| 3a 0d 09 2d 31 36 20 20 | 30 20 20 30 20 20 2d 31 |:..-16 |0 0 -1|
|00002040| 35 20 67 65 74 3a 20 68 | 73 63 72 6f 6c 6c 3f 20 |5 get: h|scroll? |
|00002050| 61 6e 64 0d 09 73 65 74 | 42 6f 75 6e 64 73 3a 20 |and..set|Bounds: |
|00002060| 74 68 65 56 73 63 72 6f | 6c 6c 20 20 6d 6f 76 65 |theVscro|ll move|
|00002070| 64 3a 20 74 68 65 56 73 | 63 72 6f 6c 6c 20 20 3b |d: theVs|croll ;|
|00002080| 6d 0d 0d 70 75 62 6c 69 | 63 0d 0d 0d 28 20 62 20 |m..publi|c...( b |
|00002090| 2d 2d 20 29 0d 3a 6d 20 | 56 53 43 52 4f 4c 4c 3a |-- ).:m |VSCROLL:|
|000020a0| 09 20 70 75 74 3a 20 76 | 73 63 72 6f 6c 6c 3f 20 |. put: v|scroll? |
|000020b0| 20 66 69 78 4d 61 69 6e | 56 69 65 77 42 6f 75 6e | fixMain|ViewBoun|
|000020c0| 64 73 3a 20 73 65 6c 66 | 20 20 3b 6d 0d 3a 6d 20 |ds: self| ;m.:m |
|000020d0| 48 53 43 52 4f 4c 4c 3a | 09 20 70 75 74 3a 20 68 |HSCROLL:|. put: h|
|000020e0| 73 63 72 6f 6c 6c 3f 20 | 20 66 69 78 4d 61 69 6e |scroll? | fixMain|
|000020f0| 56 69 65 77 42 6f 75 6e | 64 73 3a 20 73 65 6c 66 |ViewBoun|ds: self|
|00002100| 20 20 3b 6d 0d 0d 0d 3a | 6d 20 50 55 54 50 41 4e | ;m...:|m PUTPAN|
|00002110| 52 45 43 54 3a 20 20 28 | 20 6c 20 74 20 72 20 62 |RECT: (| l t r b|
|00002120| 20 2d 2d 20 29 0d 09 70 | 75 74 50 61 6e 52 65 63 | -- )..p|utPanRec|
|00002130| 74 3a 20 6d 61 69 6e 56 | 69 65 77 20 20 74 72 75 |t: mainV|iew tru|
|00002140| 65 20 70 75 74 3a 20 75 | 73 65 50 61 6e 52 65 63 |e put: u|sePanRec|
|00002150| 74 3f 0d 09 63 6f 65 72 | 63 65 50 61 6e 52 65 63 |t?..coer|cePanRec|
|00002160| 74 3a 20 6d 61 69 6e 56 | 69 65 77 20 20 73 65 74 |t: mainV|iew set|
|00002170| 50 61 6e 52 61 6e 67 65 | 73 3a 20 73 65 6c 66 20 |PanRange|s: self |
|00002180| 20 3b 6d 0d 0d 3a 6d 20 | 41 44 44 56 49 45 57 3a | ;m..:m |ADDVIEW:|
|00002190| 09 09 61 64 64 56 69 65 | 77 3a 20 6d 61 69 6e 56 |..addVie|w: mainV|
|000021a0| 69 65 77 20 20 3b 6d 0d | 0d 28 20 6e 20 2d 2d 20 |iew ;m.|.( n -- |
|000021b0| 29 0d 3a 6d 20 3e 48 55 | 4e 49 54 3a 09 70 75 74 |).:m >HU|NIT:.put|
|000021c0| 3a 20 48 75 6e 69 74 20 | 20 3b 6d 0d 3a 6d 20 3e |: Hunit | ;m.:m >|
|000021d0| 56 55 4e 49 54 3a 09 70 | 75 74 3a 20 56 75 6e 69 |VUNIT:.p|ut: Vuni|
|000021e0| 74 20 20 3b 6d 0d 0d 3a | 6d 20 3e 56 52 41 4e 47 |t ;m..:|m >VRANG|
|000021f0| 45 3a 09 70 75 74 52 61 | 6e 67 65 3a 20 74 68 65 |E:.putRa|nge: the|
|00002200| 56 73 63 72 6f 6c 6c 20 | 20 3b 6d 0d 3a 6d 20 3e |Vscroll | ;m.:m >|
|00002210| 48 52 41 4e 47 45 3a 09 | 70 75 74 52 61 6e 67 65 |HRANGE:.|putRange|
|00002220| 3a 20 74 68 65 48 73 63 | 72 6f 6c 6c 20 20 3b 6d |: theHsc|roll ;m|
|00002230| 0d 0d 3a 6d 20 3f 56 45 | 4e 41 42 4c 45 3a 09 67 |..:m ?VE|NABLE:.g|
|00002240| 65 74 3a 20 76 73 63 72 | 6f 6c 6c 3f 20 20 30 45 |et: vscr|oll? 0E|
|00002250| 58 49 54 20 20 67 65 74 | 3a 20 56 70 61 6e 20 20 |XIT get|: Vpan |
|00002260| 30 45 58 49 54 0d 09 09 | 65 6e 61 62 6c 65 3a 20 |0EXIT...|enable: |
|00002270| 74 68 65 56 73 63 72 6f | 6c 6c 20 20 3b 6d 0d 0d |theVscro|ll ;m..|
|00002280| 3a 6d 20 3f 48 45 4e 41 | 42 4c 45 3a 09 67 65 74 |:m ?HENA|BLE:.get|
|00002290| 3a 20 68 73 63 72 6f 6c | 6c 3f 20 20 30 45 58 49 |: hscrol|l? 0EXI|
|000022a0| 54 20 20 67 65 74 3a 20 | 48 70 61 6e 20 20 30 45 |T get: |Hpan 0E|
|000022b0| 58 49 54 0d 09 09 65 6e | 61 62 6c 65 3a 20 74 68 |XIT...en|able: th|
|000022c0| 65 48 73 63 72 6f 6c 6c | 20 20 3b 6d 0d 0d 3a 6d |eHscroll| ;m..:m|
|000022d0| 20 4e 45 57 3a 09 09 5c | 20 6d 61 69 6e 56 69 65 | NEW:..\| mainVie|
|000022e0| 77 20 61 6e 64 20 74 68 | 65 20 32 20 73 63 72 6f |w and th|e 2 scro|
|000022f0| 6c 6c 20 62 61 72 73 20 | 61 72 65 20 69 76 61 72 |ll bars |are ivar|
|00002300| 73 2c 20 62 75 74 20 74 | 68 65 79 20 68 61 76 65 |s, but t|hey have|
|00002310| 20 74 6f 20 62 65 0d 09 | 09 09 5c 20 20 63 68 69 | to be..|..\ chi|
|00002320| 6c 64 72 65 6e 20 61 73 | 20 77 65 6c 6c 21 0d 09 |ldren as| well!..|
|00002330| 61 64 64 72 3a 20 6d 61 | 69 6e 56 69 65 77 09 09 |addr: ma|inView..|
|00002340| 61 64 64 56 69 65 77 3a | 20 73 75 70 65 72 0d 09 |addView:| super..|
|00002350| 67 65 74 3a 20 68 73 63 | 72 6f 6c 6c 3f 20 20 49 |get: hsc|roll? I|
|00002360| 46 20 20 61 64 64 72 3a | 20 74 68 65 48 73 63 72 |F addr:| theHscr|
|00002370| 6f 6c 6c 20 20 61 64 64 | 56 69 65 77 3a 20 73 75 |oll add|View: su|
|00002380| 70 65 72 20 20 54 48 45 | 4e 0d 09 67 65 74 3a 20 |per THE|N..get: |
|00002390| 76 73 63 72 6f 6c 6c 3f | 20 20 49 46 20 20 61 64 |vscroll?| IF ad|
|000023a0| 64 72 3a 20 74 68 65 56 | 73 63 72 6f 6c 6c 20 20 |dr: theV|scroll |
|000023b0| 61 64 64 56 69 65 77 3a | 20 73 75 70 65 72 20 20 |addView:| super |
|000023c0| 54 48 45 4e 0d 09 6e 65 | 77 3a 20 73 75 70 65 72 |THEN..ne|w: super|
|000023d0| 0d 09 66 69 78 48 73 63 | 72 6f 6c 6c 42 6f 75 6e |..fixHsc|rollBoun|
|000023e0| 64 73 3a 20 73 65 6c 66 | 20 20 66 69 78 56 73 63 |ds: self| fixVsc|
|000023f0| 72 6f 6c 6c 42 6f 75 6e | 64 73 3a 20 73 65 6c 66 |rollBoun|ds: self|
|00002400| 0d 09 66 69 78 50 61 6e | 52 65 63 74 3a 20 73 65 |..fixPan|Rect: se|
|00002410| 6c 66 20 20 3b 6d 0d 0d | 0d 3a 6d 20 45 4e 41 42 |lf ;m..|.:m ENAB|
|00002420| 4c 45 3a 0d 09 67 65 74 | 3a 20 61 6c 69 76 65 3f |LE:..get|: alive?|
|00002430| 20 20 30 45 58 49 54 0d | 09 3f 56 65 6e 61 62 6c | 0EXIT.|.?Venabl|
|00002440| 65 3a 20 73 65 6c 66 20 | 20 3f 48 65 6e 61 62 6c |e: self | ?Henabl|
|00002450| 65 3a 20 73 65 6c 66 20 | 20 65 6e 61 62 6c 65 3a |e: self | enable:|
|00002460| 20 73 75 70 65 72 20 20 | 3b 6d 0d 0d 3a 6d 20 44 | super |;m..:m D|
|00002470| 49 53 41 42 4c 45 3a 0d | 09 67 65 74 3a 20 61 6c |ISABLE:.|.get: al|
|00002480| 69 76 65 3f 20 20 30 45 | 58 49 54 0d 09 67 65 74 |ive? 0E|XIT..get|
|00002490| 3a 20 76 73 63 72 6f 6c | 6c 3f 20 20 69 66 20 20 |: vscrol|l? if |
|000024a0| 64 69 73 61 62 6c 65 3a | 20 74 68 65 56 73 63 72 |disable:| theVscr|
|000024b0| 6f 6c 6c 20 20 74 68 65 | 6e 0d 09 67 65 74 3a 20 |oll the|n..get: |
|000024c0| 68 73 63 72 6f 6c 6c 3f | 20 20 69 66 20 20 64 69 |hscroll?| if di|
|000024d0| 73 61 62 6c 65 3a 20 74 | 68 65 48 73 63 72 6f 6c |sable: t|heHscrol|
|000024e0| 6c 20 20 74 68 65 6e 0d | 09 64 69 73 61 62 6c 65 |l then.|.disable|
|000024f0| 3a 20 73 75 70 65 72 20 | 20 3b 6d 0d 0d 0d 3a 6d |: super | ;m...:m|
|00002500| 20 4d 4f 56 45 44 3a 0d | 09 6d 6f 76 65 64 3a 20 | MOVED:.|.moved: |
|00002510| 73 75 70 65 72 0d 09 66 | 69 78 50 61 6e 52 65 63 |super..f|ixPanRec|
|00002520| 74 3a 20 73 65 6c 66 0d | 09 75 70 64 61 74 65 3a |t: self.|.update:|
|00002530| 20 73 65 6c 66 20 20 3b | 6d 0d 0d 0d 0d 5c 20 50 | self ;|m....\ P|
|00002540| 41 4e 3a 20 28 20 64 78 | 20 64 79 20 2d 2d 20 29 |AN: ( dx| dy -- )|
|00002550| 20 20 70 61 6e 73 20 74 | 68 65 20 76 69 65 77 20 | pans t|he view |
|00002560| 6f 76 65 72 20 74 68 65 | 20 73 75 62 76 69 65 77 |over the| subview|
|00002570| 73 20 62 79 20 74 68 65 | 20 67 69 76 65 6e 20 64 |s by the| given d|
|00002580| 69 73 74 61 6e 63 65 2e | 0d 5c 20 44 6f 65 73 6e |istance.|.\ Doesn|
|00002590| 27 74 20 61 6c 74 65 72 | 20 74 68 65 20 73 63 72 |'t alter| the scr|
|000025a0| 6f 6c 6c 20 62 61 72 73 | 20 2d 2d 20 75 73 65 20 |oll bars| -- use |
|000025b0| 50 41 4e 52 49 47 48 54 | 3a 20 65 74 63 2e 20 66 |PANRIGHT|: etc. f|
|000025c0| 6f 72 20 74 68 69 73 2c | 20 73 69 6e 63 65 20 74 |or this,| since t|
|000025d0| 68 65 79 0d 5c 20 61 64 | 6a 75 73 74 20 74 68 65 |hey.\ ad|just the|
|000025e0| 20 61 70 70 72 6f 70 72 | 69 61 74 65 20 73 63 72 | appropr|iate scr|
|000025f0| 6f 6c 6c 20 62 61 72 20 | 61 6e 64 20 74 68 65 6e |oll bar |and then|
|00002600| 20 63 61 6c 6c 20 50 41 | 4e 3a 2e 0d 0d 5c 20 4f | call PA|N:...\ O|
|00002610| 75 72 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 20 69 73 |ur conve|ntion is|
|00002620| 20 74 68 61 74 20 70 6f | 73 69 74 69 76 65 20 64 | that po|sitive d|
|00002630| 78 20 61 6e 64 20 64 79 | 20 63 6f 72 72 65 73 70 |x and dy| corresp|
|00002640| 6f 6e 64 20 74 6f 20 61 | 20 70 61 6e 20 74 6f 20 |ond to a| pan to |
|00002650| 74 68 65 0d 5c 20 72 69 | 67 68 74 20 61 6e 64 20 |the.\ ri|ght and |
|00002660| 64 6f 77 6e 2c 20 77 68 | 69 63 68 20 6d 65 61 6e |down, wh|ich mean|
|00002670| 73 20 74 68 61 74 20 74 | 68 65 20 73 75 62 76 69 |s that t|he subvi|
|00002680| 65 77 73 20 61 72 65 20 | 62 65 69 6e 67 20 73 68 |ews are |being sh|
|00002690| 69 66 74 65 64 20 74 6f | 20 74 68 65 0d 5c 20 6c |ifted to| the.\ l|
|000026a0| 65 66 74 20 61 6e 64 20 | 75 70 2c 20 77 68 69 63 |eft and |up, whic|
|000026b0| 68 20 69 73 20 61 20 22 | 6e 65 67 61 74 69 76 65 |h is a "|negative|
|000026c0| 22 20 73 68 69 66 74 2e | 20 20 49 74 27 73 20 76 |" shift.| It's v|
|000026d0| 65 72 79 20 65 61 73 79 | 20 74 6f 20 67 65 74 20 |ery easy| to get |
|000026e0| 74 68 69 73 0d 5c 20 6d | 69 78 65 64 20 75 70 2c |this.\ m|ixed up,|
|000026f0| 20 62 75 74 20 69 74 20 | 77 6f 75 6c 64 20 62 65 | but it |would be|
|00002700| 20 6a 75 73 74 20 61 73 | 20 63 6f 6e 66 75 73 69 | just as| confusi|
|00002710| 6e 67 20 69 66 20 49 20 | 64 69 64 20 69 74 20 74 |ng if I |did it t|
|00002720| 68 65 20 6f 74 68 65 72 | 20 77 61 79 0d 5c 20 61 |he other| way.\ a|
|00002730| 72 6f 75 6e 64 2e 20 20 | 49 66 20 73 6f 6d 65 74 |round. |If somet|
|00002740| 68 69 6e 67 20 64 6f 65 | 73 6e 27 74 20 77 6f 72 |hing doe|sn't wor|
|00002750| 6b 2c 20 74 72 79 20 72 | 65 76 65 72 73 69 6e 67 |k, try r|eversing|
|00002760| 20 74 68 65 20 73 69 67 | 6e 73 21 21 0d 0d 5c 20 | the sig|ns!!..\ |
|00002770| 41 6e 6f 74 68 65 72 20 | 70 6f 69 6e 74 20 74 6f |Another |point to|
|00002780| 20 6e 6f 74 65 20 69 73 | 20 74 68 61 74 20 49 27 | note is| that I'|
|00002790| 76 65 20 66 6f 75 6e 64 | 20 62 79 20 65 78 70 65 |ve found| by expe|
|000027a0| 72 69 6d 65 6e 74 61 74 | 69 6f 6e 20 74 68 61 74 |rimentat|ion that|
|000027b0| 20 69 66 0d 5c 20 74 68 | 65 20 6d 6f 75 73 65 20 | if.\ th|e mouse |
|000027c0| 69 73 20 68 65 6c 64 20 | 64 6f 77 6e 20 69 6e 20 |is held |down in |
|000027d0| 61 20 73 63 72 6f 6c 6c | 20 62 61 72 20 61 72 72 |a scroll| bar arr|
|000027e0| 6f 77 2c 20 6f 75 72 20 | 61 72 72 6f 77 20 72 6f |ow, our |arrow ro|
|000027f0| 75 74 69 6e 65 2c 20 77 | 68 69 63 68 0d 5c 20 69 |utine, w|hich.\ i|
|00002800| 73 20 70 61 73 73 65 64 | 20 74 6f 20 54 72 61 63 |s passed| to Trac|
|00002810| 6b 43 6f 6e 74 72 6f 6c | 20 61 73 20 61 20 70 72 |kControl| as a pr|
|00002820| 6f 63 2c 20 67 65 74 73 | 20 63 61 6c 6c 65 64 20 |oc, gets| called |
|00002830| 63 6f 6e 74 69 6e 75 61 | 6c 6c 79 20 2d 2d 20 74 |continua|lly -- t|
|00002840| 68 75 73 20 77 65 0d 5c | 20 63 61 6e 27 74 20 68 |hus we.\| can't h|
|00002850| 61 6e 64 6c 65 20 61 6e | 20 75 70 64 61 74 65 20 |andle an| update |
|00002860| 65 76 65 6e 74 20 6f 6e | 20 74 68 65 20 77 69 6e |event on| the win|
|00002870| 64 6f 77 20 61 72 65 20 | 75 6e 74 69 6c 20 6d 6f |dow are |until mo|
|00002880| 75 73 65 2d 75 70 2e 20 | 20 49 27 6d 20 6e 6f 74 |use-up. | I'm not|
|00002890| 0d 5c 20 65 76 65 6e 20 | 73 75 72 65 20 74 68 65 |.\ even |sure the|
|000028a0| 72 65 20 69 73 20 61 6e | 20 75 70 64 61 74 65 20 |re is an| update |
|000028b0| 65 76 65 6e 74 20 75 6e | 74 69 6c 20 74 68 65 6e |event un|til then|
|000028c0| 2c 20 61 6e 79 77 61 79 | 2e 0d 5c 20 49 20 67 75 |, anyway|..\ I gu|
|000028d0| 65 73 73 20 41 70 70 6c | 65 27 73 20 69 64 65 61 |ess Appl|e's idea|
|000028e0| 20 69 73 20 74 68 61 74 | 20 65 61 63 68 20 74 69 | is that| each ti|
|000028f0| 6d 65 20 74 68 65 20 6f | 72 69 67 69 6e 20 73 68 |me the o|rigin sh|
|00002900| 6f 75 6c 64 20 67 65 74 | 0d 5c 20 73 68 69 66 74 |ould get|.\ shift|
|00002910| 65 64 2c 20 73 6f 20 74 | 68 61 74 20 74 68 65 20 |ed, so t|hat the |
|00002920| 6c 69 74 74 6c 65 20 72 | 65 63 74 61 6e 67 6c 65 |little r|ectangle|
|00002930| 73 20 77 68 69 63 68 20 | 61 72 65 20 69 6e 76 61 |s which |are inva|
|00002940| 6c 69 64 61 74 65 64 20 | 65 61 63 68 20 74 69 6d |lidated |each tim|
|00002950| 65 0d 5c 20 67 65 74 20 | 61 63 63 75 6d 75 6c 61 |e.\ get |accumula|
|00002960| 74 65 64 20 70 72 6f 70 | 65 72 6c 79 2e 20 20 42 |ted prop|erly. B|
|00002970| 75 74 20 69 6e 20 6f 75 | 72 20 77 61 79 20 6f 66 |ut in ou|r way of|
|00002980| 20 64 6f 69 6e 67 20 74 | 68 69 6e 67 73 2c 20 77 | doing t|hings, w|
|00002990| 65 27 72 65 20 75 73 69 | 6e 67 0d 5c 20 74 68 65 |e're usi|ng.\ the|
|000029a0| 20 67 72 61 66 70 6f 72 | 74 20 6f 72 69 67 69 6e | grafpor|t origin|
|000029b0| 20 61 6c 6c 20 74 68 65 | 20 74 69 6d 65 20 28 75 | all the| time (u|
|000029c0| 6e 74 69 6c 20 61 20 44 | 52 41 57 3a 20 69 73 20 |ntil a D|RAW: is |
|000029d0| 64 6f 6e 65 29 2c 20 73 | 6f 20 74 68 65 20 73 61 |done), s|o the sa|
|000029e0| 6d 65 0d 5c 20 72 65 63 | 74 61 6e 67 6c 65 20 77 |me.\ rec|tangle w|
|000029f0| 6f 75 6c 64 20 67 65 74 | 20 69 6e 76 61 6c 69 64 |ould get| invalid|
|00002a00| 61 74 65 64 20 72 65 70 | 65 61 74 65 64 6c 79 2e |ated rep|eatedly.|
|00002a10| 20 20 53 6f 20 77 65 20 | 68 61 6e 64 6c 65 20 74 | So we |handle t|
|00002a20| 68 69 73 20 77 69 74 68 | 20 61 6e 0d 5c 20 69 76 |his with| an.\ iv|
|00002a30| 61 72 2c 20 23 75 70 64 | 61 74 65 73 2e 20 20 49 |ar, #upd|ates. I|
|00002a40| 66 20 77 65 20 67 65 74 | 20 61 20 50 41 4e 3a 20 |f we get| a PAN: |
|00002a50| 63 61 6c 6c 20 61 6e 64 | 20 23 75 70 64 61 74 65 |call and| #update|
|00002a60| 73 20 69 73 20 7a 65 72 | 6f 2c 20 77 65 20 63 61 |s is zer|o, we ca|
|00002a70| 6c 6c 0d 5c 20 49 6e 76 | 61 6c 52 65 63 74 20 61 |ll.\ Inv|alRect a|
|00002a80| 73 20 6e 6f 72 6d 61 6c | 2e 20 20 49 66 20 23 75 |s normal|. If #u|
|00002a90| 70 64 61 74 65 73 20 69 | 73 20 31 2c 20 74 68 65 |pdates i|s 1, the|
|00002aa0| 20 6c 69 74 74 6c 65 20 | 72 65 63 74 61 6e 67 6c | little |rectangl|
|00002ab0| 65 20 77 69 6c 6c 20 61 | 6c 72 65 61 64 79 0d 5c |e will a|lready.\|
|00002ac0| 20 62 65 20 69 6e 76 61 | 6c 69 64 2c 20 62 75 74 | be inva|lid, but|
|00002ad0| 20 72 61 74 68 65 72 20 | 74 68 61 6e 20 74 72 79 | rather |than try|
|00002ae0| 69 6e 67 20 74 6f 20 69 | 6e 76 61 6c 69 64 61 74 |ing to i|nvalidat|
|00002af0| 65 20 61 6e 20 61 64 6a | 61 63 65 6e 74 20 72 65 |e an adj|acent re|
|00002b00| 63 74 61 6e 67 6c 65 0d | 5c 20 77 65 20 74 61 6b |ctangle.|\ we tak|
|00002b10| 65 20 74 68 65 20 65 61 | 73 79 20 77 61 79 20 6f |e the ea|sy way o|
|00002b20| 75 74 20 61 6e 64 20 69 | 6e 76 61 6c 69 64 61 74 |ut and i|nvalidat|
|00002b30| 65 20 74 68 65 20 77 68 | 6f 6c 65 20 76 69 65 77 |e the wh|ole view|
|00002b40| 52 65 63 74 2e 20 20 41 | 74 20 6c 65 61 73 74 0d |Rect. A|t least.|
|00002b50| 5c 20 74 68 61 74 20 77 | 61 79 20 77 65 20 63 61 |\ that w|ay we ca|
|00002b60| 6e 20 62 65 20 73 75 72 | 65 20 77 65 20 64 6f 6e |n be sur|e we don|
|00002b70| 27 74 20 6d 69 73 73 20 | 75 70 64 61 74 69 6e 67 |'t miss |updating|
|00002b80| 20 73 6f 6d 65 74 68 69 | 6e 67 2e 20 20 49 66 20 | somethi|ng. If |
|00002b90| 23 75 70 64 61 74 65 73 | 0d 5c 20 69 73 20 67 72 |#updates|.\ is gr|
|00002ba0| 65 61 74 65 72 20 74 68 | 61 6e 20 32 2c 20 77 65 |eater th|an 2, we|
|00002bb0| 27 76 65 20 61 6c 72 65 | 61 64 79 20 69 6e 76 61 |'ve alre|ady inva|
|00002bc0| 6c 69 64 61 74 65 64 20 | 74 68 65 20 76 69 65 77 |lidated |the view|
|00002bd0| 52 65 63 74 2c 20 73 6f | 20 74 68 65 72 65 27 73 |Rect, so| there's|
|00002be0| 0d 5c 20 6e 6f 74 68 69 | 6e 67 20 6c 65 66 74 20 |.\ nothi|ng left |
|00002bf0| 74 6f 20 64 6f 20 2d 2d | 20 73 6f 20 74 68 61 74 |to do --| so that|
|00002c00| 27 73 20 65 78 61 63 74 | 6c 79 20 77 68 61 74 20 |'s exact|ly what |
|00002c10| 77 65 20 64 6f 2e 0d 0d | 5c 20 41 6e 6f 74 68 65 |we do...|\ Anothe|
|00002c20| 72 20 70 6f 69 6e 74 20 | 74 68 61 74 20 68 61 73 |r point |that has|
|00002c30| 20 63 6f 6d 65 20 6f 75 | 74 20 74 68 72 6f 75 67 | come ou|t throug|
|00002c40| 68 20 65 78 70 65 72 69 | 6d 65 6e 74 61 74 69 6f |h experi|mentatio|
|00002c50| 6e 20 69 73 20 74 68 61 | 74 20 74 68 65 0d 5c 20 |n is tha|t the.\ |
|00002c60| 73 63 72 6f 6c 6c 20 62 | 61 72 20 77 68 69 63 68 |scroll b|ar which|
|00002c70| 20 68 61 73 20 68 61 64 | 20 69 74 73 20 61 72 72 | has had| its arr|
|00002c80| 6f 77 20 63 6c 69 63 6b | 65 64 20 6d 75 73 74 20 |ow click|ed must |
|00002c90| 6e 6f 74 20 62 65 20 63 | 6c 69 70 70 65 64 20 6f |not be c|lipped o|
|00002ca0| 75 74 2c 20 6f 72 0d 5c | 20 74 68 65 20 74 68 75 |ut, or.\| the thu|
|00002cb0| 6d 62 20 69 73 6e 27 74 | 20 72 65 64 72 61 77 6e |mb isn't| redrawn|
|00002cc0| 20 69 6e 20 74 68 65 20 | 72 69 67 68 74 20 70 6f | in the |right po|
|00002cd0| 73 69 74 69 6f 6e 2e 20 | 20 54 68 65 20 72 65 64 |sition. | The red|
|00002ce0| 72 61 77 20 69 73 20 64 | 6f 6e 65 20 62 79 0d 5c |raw is d|one by.\|
|00002cf0| 20 74 68 65 20 73 79 73 | 74 65 6d 2c 20 62 75 74 | the sys|tem, but|
|00002d00| 20 6d 75 73 74 6e 27 74 | 20 62 65 20 63 6c 69 70 | mustn't| be clip|
|00002d10| 70 65 64 20 6f 75 74 2e | 20 20 53 6f 20 77 65 20 |ped out.| So we |
|00002d20| 73 65 74 20 74 68 65 20 | 63 6c 69 70 20 74 6f 20 |set the |clip to |
|00002d30| 74 68 65 20 72 69 67 68 | 74 0d 5c 20 63 6f 6e 74 |the righ|t.\ cont|
|00002d40| 65 6e 74 73 20 61 72 65 | 61 20 77 69 74 68 20 43 |ents are|a with C|
|00002d50| 6c 69 70 52 65 63 74 2c | 20 73 63 72 6f 6c 6c 20 |lipRect,| scroll |
|00002d60| 74 68 65 20 72 65 63 74 | 61 6e 67 6c 65 2c 20 74 |the rect|angle, t|
|00002d70| 68 65 6e 20 61 74 20 74 | 68 65 20 65 6e 64 20 73 |hen at t|he end s|
|00002d80| 65 74 0d 5c 20 74 68 65 | 20 63 6c 69 70 20 74 6f |et.\ the| clip to|
|00002d90| 20 74 68 65 20 72 65 63 | 74 20 63 6f 6e 74 61 69 | the rec|t contai|
|00002da0| 6e 69 6e 67 20 74 68 65 | 20 61 70 70 72 6f 70 72 |ning the| appropr|
|00002db0| 69 61 74 65 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 |iate scr|oll bar |
|00002dc0| 73 6f 20 74 68 61 74 20 | 74 68 65 0d 5c 20 73 79 |so that |the.\ sy|
|00002dd0| 73 74 65 6d 20 77 69 6c | 6c 20 72 65 64 72 61 77 |stem wil|l redraw|
|00002de0| 20 69 74 20 70 72 6f 70 | 65 72 6c 79 2e 20 0d 0d | it prop|erly. ..|
|00002df0| 3a 6d 20 50 41 4e 3a 20 | 20 7b 20 64 78 20 64 79 |:m PAN: | { dx dy|
|00002e00| 20 5c 20 23 75 70 64 20 | 68 65 78 74 20 76 65 78 | \ #upd |hext vex|
|00002e10| 74 20 2d 2d 20 7d 0d 09 | 64 78 20 20 2b 3a 20 68 |t -- }..|dx +: h|
|00002e20| 70 6f 73 20 20 64 79 20 | 2b 3a 20 76 70 6f 73 0d |pos dy |+: vpos.|
|00002e30| 09 6e 65 67 3e 20 64 78 | 20 20 6e 65 67 3e 20 64 |.neg> dx| neg> d|
|00002e40| 79 0d 09 5e 76 69 65 77 | 52 65 63 74 3a 20 6d 61 |y..^view|Rect: ma|
|00002e50| 69 6e 56 69 65 77 20 20 | 64 75 70 20 20 63 61 6c |inView |dup cal|
|00002e60| 6c 20 43 6c 69 70 52 65 | 63 74 0d 09 64 78 20 64 |l ClipRe|ct..dx d|
|00002e70| 79 20 70 61 63 6b 20 20 | 74 68 65 52 67 6e 20 20 |y pack |theRgn |
|00002e80| 63 61 6c 6c 20 53 63 72 | 6f 6c 6c 52 65 63 74 0d |call Scr|ollRect.|
|00002e90| 09 67 65 74 3a 20 23 75 | 70 64 61 74 65 73 20 20 |.get: #u|pdates |
|00002ea0| 2d 3e 20 23 75 70 64 20 | 20 23 75 70 64 20 31 2b |-> #upd | #upd 1+|
|00002eb0| 20 31 30 30 20 6d 69 6e | 20 20 70 75 74 3a 20 23 | 100 min| put: #|
|00002ec0| 75 70 64 61 74 65 73 0d | 09 23 75 70 64 0d 09 4e |updates.|.#upd..N|
|00002ed0| 49 46 09 09 74 68 65 52 | 67 6e 20 20 63 61 6c 6c |IF..theR|gn call|
|00002ee0| 20 49 6e 76 61 6c 52 67 | 6e 20 20 66 61 6c 73 65 | InvalRg|n false|
|00002ef0| 20 70 75 74 3a 20 73 65 | 74 43 6c 69 70 3f 0d 09 | put: se|tClip?..|
|00002f00| 45 4c 53 45 09 23 75 70 | 64 20 31 20 3d 20 49 46 |ELSE.#up|d 1 = IF|
|00002f10| 20 20 5e 76 69 65 77 52 | 65 63 74 3a 20 6d 61 69 | ^viewR|ect: mai|
|00002f20| 6e 56 69 65 77 20 20 63 | 61 6c 6c 20 49 6e 76 61 |nView c|all Inva|
|00002f30| 6c 52 65 63 74 20 20 54 | 48 45 4e 0d 09 54 48 45 |lRect T|HEN..THE|
|00002f40| 4e 0d 09 64 78 20 64 79 | 20 20 73 68 69 66 74 43 |N..dx dy| shiftC|
|00002f50| 68 69 6c 64 72 65 6e 3a | 20 6d 61 69 6e 56 69 65 |hildren:| mainVie|
|00002f60| 77 0d 09 6e 6f 43 6c 69 | 70 20 20 3b 6d 0d 09 0d |w..noCli|p ;m...|
|00002f70| 5c 20 4e 6f 74 65 3a 20 | 69 74 20 74 75 72 6e 73 |\ Note: |it turns|
|00002f80| 20 6f 75 74 20 77 65 20 | 6e 65 65 64 20 74 68 65 | out we |need the|
|00002f90| 20 6e 6f 43 6c 69 70 20 | 73 6f 20 74 68 61 74 20 | noClip |so that |
|00002fa0| 74 68 65 20 73 63 72 6f | 6c 6c 20 62 61 72 20 61 |the scro|ll bar a|
|00002fb0| 72 72 6f 77 0d 5c 20 61 | 6c 77 61 79 73 20 75 6e |rrow.\ a|lways un|
|00002fc0| 68 69 6c 69 74 65 73 2e | 0d 09 0d 0d 3a 6d 20 50 |hilites.|....:m P|
|00002fd0| 41 4e 52 49 47 48 54 3a | 20 20 7b 20 64 78 20 5c |ANRIGHT:| { dx \|
|00002fe0| 20 68 73 20 2d 2d 20 7d | 0d 09 67 65 74 3a 20 74 | hs -- }|..get: t|
|00002ff0| 68 65 48 73 63 72 6f 6c | 6c 20 20 2d 3e 20 68 73 |heHscrol|l -> hs|
|00003000| 0d 09 68 73 20 64 78 20 | 2b 20 20 67 65 74 3a 20 |..hs dx |+ get: |
|00003010| 48 70 61 6e 20 20 3e 0d | 09 49 46 20 20 67 65 74 |Hpan >.|.IF get|
|00003020| 3a 20 48 70 61 6e 20 20 | 68 73 20 2d 20 20 2d 3e |: Hpan |hs - ->|
|00003030| 20 64 78 20 20 54 48 45 | 4e 0d 09 64 78 20 20 30 | dx THE|N..dx 0|
|00003040| 45 58 49 54 0d 09 68 73 | 20 64 78 20 2b 20 20 70 |EXIT..hs| dx + p|
|00003050| 75 74 3a 20 74 68 65 48 | 73 63 72 6f 6c 6c 0d 09 |ut: theH|scroll..|
|00003060| 64 78 20 20 30 20 20 70 | 61 6e 3a 20 73 65 6c 66 |dx 0 p|an: self|
|00003070| 20 20 3b 6d 0d 0d 3a 6d | 20 50 41 4e 4c 45 46 54 | ;m..:m| PANLEFT|
|00003080| 3a 20 20 7b 20 64 78 20 | 5c 20 68 73 20 2d 2d 20 |: { dx |\ hs -- |
|00003090| 7d 0d 09 67 65 74 3a 20 | 74 68 65 48 73 63 72 6f |}..get: |theHscro|
|000030a0| 6c 6c 20 20 2d 3e 20 68 | 73 20 20 20 68 73 20 30 |ll -> h|s hs 0|
|000030b0| 45 58 49 54 0d 09 68 73 | 20 64 78 20 2d 20 20 30 |EXIT..hs| dx - 0|
|000030c0| 3c 20 69 66 20 20 68 73 | 20 2d 3e 20 64 78 20 20 |< if hs| -> dx |
|000030d0| 74 68 65 6e 0d 09 68 73 | 20 64 78 20 2d 20 20 70 |then..hs| dx - p|
|000030e0| 75 74 3a 20 74 68 65 48 | 73 63 72 6f 6c 6c 0d 09 |ut: theH|scroll..|
|000030f0| 64 78 20 6e 65 67 61 74 | 65 20 20 30 20 20 70 61 |dx negat|e 0 pa|
|00003100| 6e 3a 20 73 65 6c 66 20 | 20 3b 6d 0d 0d 3a 6d 20 |n: self | ;m..:m |
|00003110| 50 41 4e 44 4f 57 4e 3a | 20 20 7b 20 64 79 20 5c |PANDOWN:| { dy \|
|00003120| 20 76 73 20 2d 2d 20 7d | 0d 09 67 65 74 3a 20 74 | vs -- }|..get: t|
|00003130| 68 65 56 73 63 72 6f 6c | 6c 20 20 2d 3e 20 76 73 |heVscrol|l -> vs|
|00003140| 0d 09 76 73 20 64 79 20 | 2b 20 20 67 65 74 3a 20 |..vs dy |+ get: |
|00003150| 56 70 61 6e 20 20 3e 0d | 09 49 46 20 20 67 65 74 |Vpan >.|.IF get|
|00003160| 3a 20 56 70 61 6e 20 20 | 76 73 20 2d 20 20 2d 3e |: Vpan |vs - ->|
|00003170| 20 64 79 20 20 54 48 45 | 4e 0d 09 64 79 20 20 30 | dy THE|N..dy 0|
|00003180| 45 58 49 54 0d 09 76 73 | 20 64 79 20 2b 20 20 70 |EXIT..vs| dy + p|
|00003190| 75 74 3a 20 74 68 65 56 | 73 63 72 6f 6c 6c 0d 09 |ut: theV|scroll..|
|000031a0| 30 20 20 64 79 20 20 70 | 61 6e 3a 20 73 65 6c 66 |0 dy p|an: self|
|000031b0| 20 20 3b 6d 0d 0d 3a 6d | 20 50 41 4e 55 50 3a 20 | ;m..:m| PANUP: |
|000031c0| 20 7b 20 64 79 20 5c 20 | 76 73 20 2d 2d 20 7d 0d | { dy \ |vs -- }.|
|000031d0| 09 67 65 74 3a 20 74 68 | 65 56 73 63 72 6f 6c 6c |.get: th|eVscroll|
|000031e0| 20 20 2d 3e 20 76 73 20 | 20 20 76 73 20 30 45 58 | -> vs | vs 0EX|
|000031f0| 49 54 0d 09 76 73 20 64 | 79 20 2d 20 30 3c 20 20 |IT..vs d|y - 0< |
|00003200| 49 46 20 20 76 73 20 2d | 3e 20 64 79 20 20 54 48 |IF vs -|> dy TH|
|00003210| 45 4e 0d 09 76 73 20 64 | 79 20 2d 20 20 70 75 74 |EN..vs d|y - put|
|00003220| 3a 20 74 68 65 56 73 63 | 72 6f 6c 6c 0d 09 30 20 |: theVsc|roll..0 |
|00003230| 20 64 79 20 6e 65 67 61 | 74 65 20 20 70 61 6e 3a | dy nega|te pan:|
|00003240| 20 73 65 6c 66 20 20 3b | 6d 0d 0d 0d 3a 6d 20 48 | self ;|m...:m H|
|00003250| 50 41 47 45 3a 20 20 7b | 20 5c 20 6c 65 66 74 20 |PAGE: {| \ left |
|00003260| 74 6f 70 20 72 74 20 62 | 6f 74 20 2d 2d 20 23 70 |top rt b|ot -- #p|
|00003270| 69 78 65 6c 73 20 7d 0d | 09 67 65 74 3a 20 76 69 |ixels }.|.get: vi|
|00003280| 65 77 52 65 63 74 20 20 | 2d 3e 20 62 6f 74 20 20 |ewRect |-> bot |
|00003290| 2d 3e 20 72 74 20 20 2d | 3e 20 74 6f 70 20 20 2d |-> rt -|> top -|
|000032a0| 3e 20 6c 65 66 74 0d 09 | 72 74 20 6c 65 66 74 20 |> left..|rt left |
|000032b0| 2d 20 20 67 65 74 3a 20 | 48 75 6e 69 74 20 2d 20 |- get: |Hunit - |
|000032c0| 20 30 20 6d 61 78 20 20 | 3b 6d 0d 0d 3a 6d 20 56 | 0 max |;m..:m V|
|000032d0| 50 41 47 45 3a 20 20 7b | 20 5c 20 6c 65 66 74 20 |PAGE: {| \ left |
|000032e0| 74 6f 70 20 72 74 20 62 | 6f 74 20 2d 2d 20 23 70 |top rt b|ot -- #p|
|000032f0| 69 78 65 6c 73 20 7d 0d | 09 67 65 74 3a 20 76 69 |ixels }.|.get: vi|
|00003300| 65 77 52 65 63 74 20 20 | 2d 3e 20 62 6f 74 20 20 |ewRect |-> bot |
|00003310| 2d 3e 20 72 74 20 20 2d | 3e 20 74 6f 70 20 20 2d |-> rt -|> top -|
|00003320| 3e 20 6c 65 66 74 0d 09 | 62 6f 74 20 74 6f 70 20 |> left..|bot top |
|00003330| 2d 20 20 67 65 74 3a 20 | 56 75 6e 69 74 20 2d 20 |- get: |Vunit - |
|00003340| 20 30 20 6d 61 78 20 20 | 3b 6d 0d 0d 3a 6d 20 31 | 0 max |;m..:m 1|
|00003350| 52 49 47 48 54 3a 09 67 | 65 74 3a 20 48 75 6e 69 |RIGHT:.g|et: Huni|
|00003360| 74 20 20 70 61 6e 52 69 | 67 68 74 3a 20 73 65 6c |t panRi|ght: sel|
|00003370| 66 20 20 3b 6d 0d 3a 6d | 20 31 4c 45 46 54 3a 09 |f ;m.:m| 1LEFT:.|
|00003380| 67 65 74 3a 20 48 75 6e | 69 74 20 20 70 61 6e 4c |get: Hun|it panL|
|00003390| 65 66 74 3a 20 73 65 6c | 66 20 20 20 3b 6d 0d 3a |eft: sel|f ;m.:|
|000033a0| 6d 20 31 55 50 3a 09 09 | 67 65 74 3a 20 56 75 6e |m 1UP:..|get: Vun|
|000033b0| 69 74 20 20 70 61 6e 55 | 70 3a 20 73 65 6c 66 20 |it panU|p: self |
|000033c0| 20 20 20 20 3b 6d 0d 3a | 6d 20 31 44 4f 57 4e 3a | ;m.:|m 1DOWN:|
|000033d0| 09 67 65 74 3a 20 56 75 | 6e 69 74 20 20 70 61 6e |.get: Vu|nit pan|
|000033e0| 44 6f 77 6e 3a 20 73 65 | 6c 66 20 20 20 3b 6d 0d |Down: se|lf ;m.|
|000033f0| 0d 3a 6d 20 50 47 52 49 | 47 48 54 3a 09 68 50 61 |.:m PGRI|GHT:.hPa|
|00003400| 67 65 3a 20 73 65 6c 66 | 20 20 70 61 6e 52 69 67 |ge: self| panRig|
|00003410| 68 74 3a 20 73 65 6c 66 | 09 3b 6d 0d 3a 6d 20 50 |ht: self|.;m.:m P|
|00003420| 47 4c 45 46 54 3a 09 68 | 50 61 67 65 3a 20 73 65 |GLEFT:.h|Page: se|
|00003430| 6c 66 20 20 70 61 6e 4c | 65 66 74 3a 20 73 65 6c |lf panL|eft: sel|
|00003440| 66 09 3b 6d 0d 3a 6d 20 | 50 47 55 50 3a 09 76 50 |f.;m.:m |PGUP:.vP|
|00003450| 61 67 65 3a 20 73 65 6c | 66 20 20 70 61 6e 55 70 |age: sel|f panUp|
|00003460| 3a 20 73 65 6c 66 09 3b | 6d 0d 3a 6d 20 50 47 44 |: self.;|m.:m PGD|
|00003470| 4f 57 4e 3a 09 76 50 61 | 67 65 3a 20 73 65 6c 66 |OWN:.vPa|ge: self|
|00003480| 20 20 70 61 6e 44 6f 77 | 6e 3a 20 73 65 6c 66 09 | panDow|n: self.|
|00003490| 3b 6d 0d 0d 3a 6d 20 56 | 44 52 41 47 3a 09 30 20 |;m..:m V|DRAG:.0 |
|000034a0| 20 67 65 74 3a 20 74 68 | 65 56 73 63 72 6f 6c 6c | get: th|eVscroll|
|000034b0| 20 20 67 65 74 3a 20 76 | 70 6f 73 20 2d 20 20 70 | get: v|pos - p|
|000034c0| 61 6e 3a 20 73 65 6c 66 | 20 20 3b 6d 0d 3a 6d 20 |an: self| ;m.:m |
|000034d0| 48 44 52 41 47 3a 09 67 | 65 74 3a 20 74 68 65 48 |HDRAG:.g|et: theH|
|000034e0| 73 63 72 6f 6c 6c 20 20 | 67 65 74 3a 20 68 70 6f |scroll |get: hpo|
|000034f0| 73 20 2d 20 20 30 20 20 | 70 61 6e 3a 20 73 65 6c |s - 0 |pan: sel|
|00003500| 66 20 20 3b 6d 0d 09 0d | 0d 5c 20 54 68 65 20 43 |f ;m...|.\ The C|
|00003510| 4c 49 43 4b 3a 20 6d 65 | 74 68 6f 64 20 6f 6e 6c |LICK: me|thod onl|
|00003520| 79 20 68 61 73 20 74 6f | 20 64 6f 20 6f 6e 65 20 |y has to| do one |
|00003530| 65 78 74 72 61 20 74 68 | 69 6e 67 20 6f 76 65 72 |extra th|ing over|
|00003540| 20 77 68 61 74 20 56 69 | 65 77 0d 5c 20 70 72 6f | what Vi|ew.\ pro|
|00003550| 76 69 64 65 73 20 2d 20 | 77 65 20 70 75 74 20 74 |vides - |we put t|
|00003560| 68 65 20 61 64 64 72 20 | 6f 66 20 74 68 69 73 20 |he addr |of this |
|00003570| 53 63 72 6f 6c 6c 65 72 | 20 69 6e 20 63 6c 69 63 |Scroller| in clic|
|00003580| 6b 65 64 53 63 72 6f 6c | 6c 65 72 20 73 6f 20 74 |kedScrol|ler so t|
|00003590| 68 65 0d 5c 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 |he.\ scr|oll bar |
|000035a0| 61 63 74 69 6f 6e 20 68 | 61 6e 64 6c 65 72 73 20 |action h|andlers |
|000035b0| 63 61 6e 20 73 65 6e 64 | 20 6d 65 73 73 61 67 65 |can send| message|
|000035c0| 73 20 62 61 63 6b 20 74 | 6f 20 75 73 2e 0d 0d 3a |s back t|o us...:|
|000035d0| 6d 20 43 4c 49 43 4b 3a | 0d 09 5e 62 61 73 65 20 |m CLICK:|..^base |
|000035e0| 2d 3e 20 63 6c 69 63 6b | 65 64 53 63 72 6f 6c 6c |-> click|edScroll|
|000035f0| 65 72 20 20 63 6c 69 63 | 6b 3a 20 73 75 70 65 72 |er clic|k: super|
|00003600| 20 20 3b 6d 0d 0d 3a 6d | 20 43 4c 41 53 53 49 4e | ;m..:m| CLASSIN|
|00003610| 49 54 3a 0d 09 63 6c 61 | 73 73 69 6e 69 74 3a 20 |IT:..cla|ssinit: |
|00003620| 73 75 70 65 72 0d 09 74 | 72 75 65 20 20 76 73 63 |super..t|rue vsc|
|00003630| 72 6f 6c 6c 3a 20 73 65 | 6c 66 20 20 20 74 72 75 |roll: se|lf tru|
|00003640| 65 20 20 68 73 63 72 6f | 6c 6c 3a 20 73 65 6c 66 |e hscro|ll: self|
|00003650| 09 09 5c 20 44 65 66 61 | 75 6c 74 73 0d 09 34 20 |..\ Defa|ults..4 |
|00003660| 64 75 70 20 20 70 75 74 | 3a 20 48 75 6e 69 74 20 |dup put|: Hunit |
|00003670| 20 70 75 74 3a 20 56 75 | 6e 69 74 0d 09 58 54 53 | put: Vu|nit..XTS|
|00003680| 7b 20 31 6c 20 31 72 20 | 70 67 6c 20 70 67 72 20 |{ 1l 1r |pgl pgr |
|00003690| 68 64 20 7d 20 20 61 63 | 74 69 6f 6e 73 3a 20 74 |hd } ac|tions: t|
|000036a0| 68 65 48 73 63 72 6f 6c | 6c 0d 09 58 54 53 7b 20 |heHscrol|l..XTS{ |
|000036b0| 31 75 20 31 64 20 70 67 | 75 20 70 67 64 20 76 64 |1u 1d pg|u pgd vd|
|000036c0| 20 7d 20 20 61 63 74 69 | 6f 6e 73 3a 20 74 68 65 | } acti|ons: the|
|000036d0| 56 73 63 72 6f 6c 6c 0d | 09 70 61 72 52 69 67 68 |Vscroll.|.parRigh|
|000036e0| 74 20 70 61 72 54 6f 70 | 20 70 61 72 52 69 67 68 |t parTop| parRigh|
|000036f0| 74 20 70 61 72 42 6f 74 | 74 6f 6d 09 09 73 65 74 |t parBot|tom..set|
|00003700| 4a 75 73 74 3a 20 74 68 | 65 56 73 63 72 6f 6c 6c |Just: th|eVscroll|
|00003710| 0d 09 70 61 72 4c 65 66 | 74 20 70 61 72 42 6f 74 |..parLef|t parBot|
|00003720| 74 6f 6d 20 70 61 72 52 | 69 67 68 74 20 70 61 72 |tom parR|ight par|
|00003730| 42 6f 74 74 6f 6d 09 73 | 65 74 4a 75 73 74 3a 20 |Bottom.s|etJust: |
|00003740| 74 68 65 48 73 63 72 6f | 6c 6c 0d 0d 09 70 61 72 |theHscro|ll...par|
|00003750| 4c 65 66 74 20 70 61 72 | 54 6f 70 20 70 61 72 52 |Left par|Top parR|
|00003760| 69 67 68 74 20 70 61 72 | 42 6f 74 74 6f 6d 20 20 |ight par|Bottom |
|00003770| 73 65 74 4a 75 73 74 3a | 20 6d 61 69 6e 56 69 65 |setJust:| mainVie|
|00003780| 77 0d 3b 6d 0d 0d 3b 63 | 6c 61 73 73 0d 0d 0d 65 |w.;m..;c|lass...e|
|00003790| 6e 64 6c 6f 61 64 0d 0d | 0d 5c 20 54 65 73 74 69 |ndload..|.\ Testi|
|000037a0| 6e 67 20 2d 20 74 68 69 | 73 20 73 65 74 73 20 75 |ng - thi|s sets u|
|000037b0| 70 20 61 20 53 63 72 6f | 6c 6c 65 72 2e 0d 0d 73 |p a Scro|ller...s|
|000037c0| 63 72 6f 6c 6c 65 72 09 | 53 53 0d 62 75 74 74 6f |croller.|SS.butto|
|000037d0| 6e 09 09 42 42 09 09 09 | 5c 20 41 20 63 68 69 6c |n..BB...|\ A chil|
|000037e0| 64 20 76 69 65 77 20 77 | 68 69 63 68 20 69 73 20 |d view w|hich is |
|000037f0| 61 20 62 75 74 74 6f 6e | 0d 0d 0d 34 30 20 34 30 |a button|...40 40|
|00003800| 20 33 30 30 20 32 30 30 | 09 73 65 74 42 6f 75 6e | 300 200|.setBoun|
|00003810| 64 73 3a 20 73 73 0d 0d | 31 30 20 31 30 20 20 22 |ds: ss..|10 10 "|
|00003820| 20 43 6c 69 63 6b 20 68 | 65 72 65 22 09 69 6e 69 | Click h|ere".ini|
|00003830| 74 3a 20 62 62 0d 0d 0d | 3a 20 44 72 61 77 69 74 |t: bb...|: Drawit|
|00003840| 09 64 72 61 77 3a 20 74 | 65 6d 70 52 65 63 74 20 |.draw: t|empRect |
|00003850| 20 3b 09 09 5c 20 41 20 | 64 72 61 77 20 68 61 6e | ;..\ A |draw han|
|00003860| 64 6c 65 72 20 77 68 69 | 63 68 20 6a 75 73 74 20 |dler whi|ch just |
|00003870| 64 72 61 77 73 20 74 68 | 65 20 76 69 65 77 52 65 |draws th|e viewRe|
|00003880| 63 74 0d 0d 3a 20 44 72 | 61 77 53 53 09 64 72 61 |ct..: Dr|awSS.dra|
|00003890| 77 3a 20 73 73 20 20 3b | 09 09 09 09 5c 20 44 72 |w: ss ;|....\ Dr|
|000038a0| 61 77 20 68 61 6e 64 6c | 65 72 20 66 6f 72 20 66 |aw handl|er for f|
|000038b0| 57 69 6e 64 20 66 6f 72 | 20 74 65 73 74 0d 0d 3a |Wind for| test..:|
|000038c0| 20 43 6c 69 63 6b 65 64 | 0d 09 6e 6f 63 6c 69 70 | Clicked|..noclip|
|000038d0| 0d 09 2e 22 20 63 6c 69 | 63 6b 65 64 20 22 20 2e |..." cli|cked " .|
|000038e0| 69 64 3a 20 5b 73 65 6c | 66 5d 20 63 72 0d 5c 20 |id: [sel|f] cr.\ |
|000038f0| 4e 6f 77 20 77 65 20 65 | 78 70 61 6e 64 20 73 73 |Now we e|xpand ss|
|00003900| 20 61 20 62 69 74 20 74 | 6f 20 63 68 65 63 6b 20 | a bit t|o check |
|00003910| 69 66 20 74 68 65 20 73 | 63 72 6f 6c 6c 20 62 61 |if the s|croll ba|
|00003920| 72 73 20 6d 6f 76 65 20 | 61 6e 64 20 72 65 73 69 |rs move |and resi|
|00003930| 7a 65 3a 0d 09 67 65 74 | 42 6f 75 6e 64 73 3a 20 |ze:..get|Bounds: |
|00003940| 73 73 0d 09 31 30 20 2b | 0d 09 73 77 61 70 20 32 |ss..10 +|..swap 2|
|00003950| 30 20 2b 20 73 77 61 70 | 0d 09 73 65 74 42 6f 75 |0 + swap|..setBou|
|00003960| 6e 64 73 3a 20 73 73 20 | 20 6d 6f 76 65 64 3a 20 |nds: ss | moved: |
|00003970| 73 73 20 20 3b 0d 0d 0d | 3a 20 63 6f 6e 74 65 6e |ss ;...|: conten|
|00003980| 74 43 6c 69 63 6b 09 09 | 09 5c 20 4e 65 77 20 63 |tClick..|.\ New c|
|00003990| 6f 6e 74 65 6e 74 20 63 | 6c 69 63 6b 20 68 61 6e |ontent c|lick han|
|000039a0| 64 6c 65 72 20 66 6f 72 | 20 66 57 69 6e 64 0d 09 |dler for| fWind..|
|000039b0| 09 09 63 6c 69 63 6b 3a | 20 73 73 20 20 64 72 6f |..click:| ss dro|
|000039c0| 70 20 20 3b 0d 09 09 09 | 0d 27 20 64 72 61 77 69 |p ;....|.' drawi|
|000039d0| 74 09 73 65 74 44 72 61 | 77 3a 20 73 73 0d 0d 27 |t.setDra|w: ss..'|
|000039e0| 20 63 6c 69 63 6b 65 64 | 09 64 75 70 20 73 65 74 | clicked|.dup set|
|000039f0| 63 6c 69 63 6b 3a 20 73 | 73 20 20 73 65 74 63 6c |click: s|s setcl|
|00003a00| 69 63 6b 3a 20 62 62 0d | 0d 3a 20 47 4f 0d 09 63 |ick: bb.|.: GO..c|
|00003a10| 6c 73 0d 09 78 74 73 7b | 20 6e 75 6c 6c 20 6e 75 |ls..xts{| null nu|
|00003a20| 6c 6c 20 64 72 61 77 53 | 53 20 63 6f 6e 74 65 6e |ll drawS|S conten|
|00003a30| 74 43 6c 69 63 6b 20 7d | 20 20 61 63 74 69 6f 6e |tClick }| action|
|00003a40| 73 3a 20 66 57 69 6e 64 | 0d 09 62 62 20 61 64 64 |s: fWind|..bb add|
|00003a50| 76 69 65 77 3a 20 73 73 | 0d 09 66 57 69 6e 64 20 |view: ss|..fWind |
|00003a60| 20 73 65 74 57 69 6e 64 | 6f 77 3a 20 73 73 09 5c | setWind|ow: ss.\|
|00003a70| 20 4e 6f 72 6d 61 6c 6c | 79 20 64 6f 6e 65 20 61 | Normall|y done a|
|00003a80| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 66 72 6f |utomatic|ally fro|
|00003a90| 6d 20 4e 45 57 3a 20 69 | 6e 20 57 69 6e 64 6f 77 |m NEW: i|n Window|
|00003aa0| 2b 0d 09 6e 65 77 3a 20 | 73 73 09 09 09 09 09 5c |+..new: |ss.....\|
|00003ab0| 20 44 69 74 74 6f 0d 09 | 30 20 30 20 31 30 30 30 | Ditto..|0 0 1000|
|00003ac0| 20 31 30 30 30 20 20 70 | 75 74 50 61 6e 52 65 63 | 1000 p|utPanRec|
|00003ad0| 74 3a 20 73 73 0d 09 64 | 72 61 77 3a 20 73 73 20 |t: ss..d|raw: ss |
|00003ae0| 20 3b 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | ;......|........|
|00003af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b00| 00 00 01 00 00 00 01 3c | 00 00 00 3c 00 00 00 3b |.......<|...<...;|
|00003b10| 00 00 04 51 29 aa ff ff | 7f 12 06 00 00 00 00 00 |...Q)...|........|
|00003b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b30| 08 53 63 72 6f 6c 6c 65 | 72 00 02 00 00 00 50 61 |.Scrolle|r.....Pa|
|00003b40| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 01 |rtSITx..|........|
|00003b50| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00003b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b70| 00 00 ab 06 23 63 00 00 | 00 00 00 00 01 77 00 00 |....#c..|.....w..|
|00003b80| 04 53 29 53 ff ff 7f 12 | 06 00 00 00 00 00 00 00 |.S)S....|........|
|00003b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 08 00 00 |........|........|
|00003bc0| 00 00 00 00 00 10 00 00 | 00 00 00 00 00 08 00 00 |........|........|
|00003bd0| 00 00 00 00 00 08 00 00 | 00 00 00 00 00 10 00 00 |........|........|
|00003be0| 00 00 a7 87 57 44 00 00 | 02 1e 05 00 00 00 04 74 |....WD..|.......t|
|00003bf0| 2c 25 01 01 7f 11 07 00 | 00 00 00 00 00 00 00 00 |,%......|........|
|00003c00| 00 00 00 38 00 00 00 00 | 00 00 31 05 00 00 00 00 |...8....|..1.....|
|00003c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 36 f9 |........|......6.|
|00003c30| 00 00 37 01 00 00 00 00 | 00 00 00 00 00 00 01 00 |..7.....|........|
|00003c40| 00 00 01 3c 00 00 00 3c | 00 00 00 3b 00 71 f3 f4 |...<...<|...;.q..|
|00003c50| 0d 3a 00 00 00 1c 00 32 | 00 00 4d 49 46 4f 00 00 |.:.....2|..MIFO..|
|00003c60| 00 0a 00 80 00 00 00 00 | 00 00 00 71 f9 00 08 4d |........|...q...M|
|00003c70| 69 73 63 49 6e 66 6f 00 | 00 00 00 00 00 00 00 00 |iscInfo.|........|
+--------+-------------------------+-------------------------+--------+--------+